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

'repeat' loop doesn't end when requirements met?

I haven't coded in a really long time so i'm quite rusty with coding atm, can someone help me out with this very simple loop problem

local part = script.Parent
local orig = "17, 18, 2"



repeat
	wait(0.001)
	part.Size = part.Size + Vector3.new(0,0.5,0)
until part.Size == orig

Once the part size is equal to 'orig' it doesn't stop the loop. I might be missing a very big point; any help would be appreciated.

1 answer

✓ Accepted answer

The problem is that orig is a string. Try this:

local orig  = Vector3.new(17, 18, 2)

This will make orig a Vector3 value instead of a string

2 comments

0

Agreed

0

Thanks!

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