this is my script: if script.Parent.Health.Value == 0 then script.Parent:Destroy() end I am trying to make the script to check if it is 0 or not but it is checking only once
COMMUNITY QUESTION
how can i make the game to check all the time?
1 answer
while true do
wait()
if script.Parent.Health.Value == 0 then
script.Parent:Destroy()
end
This should fix your problem :D
Learn more about loops :
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
thank you
np
Also see this https://devforum.roblox.com/t/avoiding-wait-and-why/244015