How To Make A Clicker Game In Roblox Studio! [PART 1]
ChertDev
Views: 2350
Like: 42
Code For Datastore Leaderstats (If you want it)
————————————————————————————————————
local DataStoreService = game:GetService(“DataStoreService”)
local DataStore = DataStoreService:GetDataStore(“Data”)
————————————————————————————————————
local DataStoreService = game:GetService(“DataStoreService”)
local DataStore = DataStoreService:GetDataStore(“Data”)
game.Players.PlayerAdded:Connect(function(Player)
local leaderstats = Instance.new(“Folder”, Player)
leaderstats.Name = “leaderstats”
local Clicks = Instance.new(“IntValue”, leaderstats)
Clicks.Name = “Clicks”
Clicks.Value = 0
local Rebirths = Instance.new(“IntValue”, leaderstats)
Rebirths.Name = “Rebirths”
Rebirths.Value = 0
local Data = DataStore:GetAsync(Player.UserId)
if Data then
Clicks.Value = Data.Clicks
Rebirths.Value = Data.Rebirths
end
end)
game.Players.PlayerRemoving:Connect(function(Player)
DataStore:SetAsync(Player.UserId, {
[“Clicks”] = Player.leaderstats.Clicks.Value;
[“Rebirths”] = Player.leaderstats.Rebirths.Value;
})
end)
Profile
25.09.2023