Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why doesn't this work? Why isn't there an output?

I have a script, it repeats, but i am not getting ANY output, and nothing is happening! Why not? Here is my script

repeat
	wait(0.5)
	print("waited")
	script.Parent.Value = script.Parent.Parent.Parent.Character.Player.Humanoid.Health
until 9 + 10 == 21

-EDIT- P.S this script is inside of a value, which is inside of the player

Please help! Thank you

2 comments

0

Since it doesn't seem like you intend to stop the 'repeat' loop, try a 'while' loop instead.

0

If the Script is inside the 'Value' type instance, which is Parented to the 'Player', then it would be 'script.Parent.Parent.Character', also, it may be because the Script may be Disabled, that could be why your not receiving Output.

2 answers

**Note: **You don't need to do repeat wait until 9 + 10 == 21 to make something run forever, rather do:

while wait(0.5) do
	
end

Is your script inside of a NumberValue, if so, try putting it somewhere else, or switch it so the script is the parent of the numbervalue.

Since this question is quite vague, I hope I did my best to answer it, but what is the three "Parent.Parent.Parent", it would be nice if you could show us some hichery.

This discussion is preserved as it was. New answers, comments, and votes are closed.