I have it so the value that the script is in will go down 1 ever 2 seconds, and it worked outside of the player but as soon as i made it go inside of the player as a leaderstat, it doesnt work.
repeat
print("going")
script.Parent.Value = script.Parent.Value - 1
wait(0.5)
print("gone")
until 9 + 10 == 21
I have fixed the problem, instead of making the script go inside of the value, i made it edit it instead! here is the finished and working script!
repeat
print("going")
script.Parent.Parent.Parent.Air.Oxygen.Value = script.Parent.Parent.Parent.Air.Oxygen.Value - 1
wait(2.5)
print("gone")
until 9 + 10 == 21
Thank you!!!

1 comment