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

HELP! i cannot make a loop for my CFrame script! Is it how i use my ='s?

This is my script:

LOL = game.workspace.Part

while LOL.game.workspace.Part == true do 
LOL.CFrame = CFrame.new(-8.5, 6.5, 24.5)
wait(1)
LOL.CFrame = CFrame.new(-12.5, 3.5, 20.5)
wait(1) LOL.CFrame = CFrame.new(-18.5, 8.5, 20.5)

I have no idea how to make a loop for this. Any ideas?

4 comments

1

Please put this into a code block please.

0

You're indexing "Part" as a boolean on line 3, from what I'm looking at. :P

0

-_- Is this a troll post?

0

no

1 answer

Firstly, you're indexing your part as a boolean, which it isn't. You need to insert a BoolValue into it and name it Boolean. Now we need to see if it is true;

LOL = game.workspace.Part

while LOL.Boolean.Value do -- We don't need to do` == true` as this is an automatic feature in Lua.
	LOL.CFrame = CFrame.new(-8.5, 6.5, 24.5) 
	wait(1) 
	LOL.CFrame = CFrame.new(-12.5, 3.5, 20.5) 
	wait(1) 
	LOL.CFrame = CFrame.new(-18.5, 8.5, 20.5)
end

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