Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 7 years ago
Edited 7 years ago

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?

1
Please put this into a code block please. TheUniPiggy 77 — 7y
0
You're indexing "Part" as a boolean on line 3, from what I'm looking at. :P TheeDeathCaster 2368 — 7y
0
-_- Is this a troll post? Meltdown81 309 — 7y
0
no brickzay 0 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

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
Ad

Answer this question