This is a timer that counts down, it's meant to count down as you can tell, but in the real game, it doesn't count down, I don't understand what is wrong with this. If anyone knows how to fix this that would be greatly appreciated, thank you! I think that in the actual game that the TimeRemaining doesn't even change, this is a problem I do not know how to fix, I don't know if I say ":WaitForChild()" again or just add something else.
local Status = game.ReplicatedStorage:WaitForChild("Status")
local TimeRemaining = game.ReplicatedStorage:WaitForChild("TimeRemaining")
while true do
wait(1)
TimeRemaining.Value = TimeRemaining.Value - 1
TimeRemaining.Changed:Connect(function()
script.Parent.Text = "Time Remaining Until KOs Turned Into Coins: "..TimeRemaining.Value
if TimeRemaining.Value < 1 then
Status.Value = "Reseting KOs..."
wait(0.6)
game.Players.LocalPlayer.CoinStats.Value = game.Players.LocalPlayer.leaderstats.KOs.Value / 2
wait(0.16)
game.Players.LocalPlayer.leaderstats.KOs.Value = 0
wait(2.1)
TimeRemaining.Value = 160
Status.Value = "Time Remaining Until KOs Turned Into Coins: "..TimeRemaining.Value
end
end)
end

1 comment
Thank you so much!