Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My Wins in leaderstats Can't Go Upper than 40 why?

Asked by 5 years ago

I can't get Like 41 Wins, Stuck to 40

local datastore = game:GetService("DataStoreService")
local ds1 = datastore:GetDataStore("winsSaveSystem")--change all "wins" to what value you want and keep doing it 
local Debounce = tick() -- Assign tick() to the variable
game.Players.PlayerAdded:Connect(function(player)
 local folder = Instance.new("Folder", player)
 folder.Name = "leaderstats"
 local wins = Instance.new("IntValue", folder)
 wins.Name = "Wins"
 wins.Value = ds1:GetAsync(player.UserId) or 0
 ds1:SetAsync(player.UserId, wins.Value)

workspace.Lobby.DROPDOWN.Winner.Touched:Connect(function()
    if (tick() - Debounce) >= 5 then -- Make sure 5 seconds have elapsed since last debounce
        Debounce = tick()
            wins.Value = wins.Value + 1


    end
end)



 wins.Changed:Connect(function()
  ds1:SetAsync(player.UserId, wins.Value)
 end)



end)

0
it might have to do with the touched function.. make that a whole nw script Imperialy 149 — 5y
0
It Works If I Have Like from 0 Wins Up To 40, It Won't Go Upper BloxEnergy -76 — 5y

Answer this question