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

Loop not working, and no errors showing up at all?

while true do
	if script.Parent.Parent.On.Value == true then
		script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0,0.1,0)
	wait()
	end
end

When I set the value to true, nothing happens, at all.

4 comments

0

youre putting the wait in the wrong thread because if it isnt on it will break

0

Could you print script.Parent.Parent.On.Value. If it's false, that's the problem.

0

Misha, where do I need to put the wait?

0

Also, write it as an answer to the question so I can accept it if it works.

1 answer

✓ Accepted answer

You need to put the wait() outside of the if statement, put it right before the end that ends the loop.

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