Hi there,
I'm making a game called Crumble Runner, and I'm making a system of how long they survive. At the end of the round, the longer they survive the more points they get. It's a Script in StarterPack. However, when the round ends the points don't seem to be added for some reason. Can someone help me?
Code:
local gameIsPlaying = game.ServerStorage.ValueStorage.GameIsPlaying
local player = script.Parent.Parent
local timer = 0
player.InGame.Changed:connect(function()
if player.InGame.Value == true then
wait(3)
repeat
wait(1)
timer = timer + 1
until player.InGame.Value == false or timer == 80
repeat wait() until gameIsPlaying.Value == false
player.Points.Value = player.Points.Value + timer
timer = 0
end
end)
I'd really appreciate it if someone could help me with this.
Thanks, PickUpTheBeat1.

7 comments
No errors. All I know is that it occured on this line: repeat wait() until gameIsPlaying.Value == false
Where do you set that value to false?
In another script in Workspace.
Set some random prints throughout the script so you know where it doesn't work at. I'm guessing it has something to do with player.InGame.Value not changing correctly. Also double check that script.Parent.Parent is the player
I did that already, it stopped occuring on the line in the above comment.
This is probably not the problem, but it could be. The script resets every time the player dies, so I might have to put it in starter scripts.
Yeah it worked when I did it in StarterGui!