Hey!
So i’ve been working on a zombie survival type game and i’m trying to figure out how to make a players cash reset after every round I already have this part of the script:
local gameInProgress = game.ReplicatedStorage.Values.gameInProgress gameInProgress:GetPropertyChangedSignal("Value"):Connect(function()
I have this part of the script, however I do not know what to write to make the Cash leaderstat reset.
Here
local Value = game.ReplicatedStorage.Values.gameInProgress
Value:GetPropertyChangedSignal(“Value”):Connect(function()
if Value == 0 then
for _, player in pairs(game.Players:GetChildren()) do
local Leaderstats = player:FirstFindChild(“YourFolderHere”)
local Cash = Leaderstats:WaitForChild(“Cash”)
Cash = 0
end
end
end)