How To Make A Clicker Game In Roblox Studio! [PART 1] - androidgamestore.net

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”)

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

Leave a Reply

Your email address will not be published.