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

Frame keeps moving when its supposed to stop?

I don't know why. I did everything like its supposed to be like.

Script:

script.Parent.MouseButton1Click:connect(function()
	repeat
		wait(0.000000000000000000000000000000000000000000000000001)
		script.Parent.Parent.Frame.Position = script.Parent.Parent.Frame.Position + UDim2.new(0,5,0,0)
	until script.Parent.Parent.Frame.Position == UDim2.new(0,200,0,100)
end)

lol ignore the wait(0.000000000000000000000000000000000000000000000000000001)

1 comment

1

the wait() function has a limit, you know. 0.03 seconds. You can just use wait() to get the same result.

1 answer

✓ Accepted answer

You keep adding 5 to the X Offset, but you're checking if the X Offset is 200 AND the Y Offset is 100, but the Y Offset never reaches 100?

Change line 5 to

until script.Parent.Parent.Frame.Position.X.Offset >= 200

1 comment

0

thx

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