The is part of my script below and it works fine on studio and changes the value of Gameplay to 1 on the leaderboard but as soon as i go to use it through playing my game on the roblox website it counts down to 20 and will not go past that... Pretty much just pauses the script. I have no idea what I've done.
_G.countdowngo="Game starting in 0:20"
wait(1)
local stats = game.Players.LocalPlayer:findFirstChild("leaderstats")
if (stats~=nil) then
local score = stats:findFirstChild("Gameplay")
if (score~=nil) then
score.Value = score.Value + 1
end
end
wait(1)
_G.countdowngo="Game starting in 0:19"
wait(1)

1 comment
Im pretty sure that anything dealing with "local", cannot communicate with "game"