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

Why dose this function not work / Keep Crashing?!

Asked by
Dr_Doge 100
8 years ago

So I'm creating a Tablet Admin, for SB, and I already have a function that puts a brick inside my Torso, but the thing is, the function I created to make the brick go around me is't Working properly!

Whenever I call the function, It crashes!

function Revolve()
for angle = 10, math.huge, 2 do
local c = game.Players.LocalPlayer.Character.Torso:GetChildren()
for i = 1, #c do
if (c[i].Name == "FancyBlox") then
c[i].CFrame = game.Players.LocalPlayer.Character.Torso.CFrame
* CFrame.Angles(0, math.rad(angle)*2, 0) 
* CFrame.new(0, 0, 10) 
end
end
end
end

I know the Rotate around me script thing works. Ive tried puting the Create Brick function, and the rotate around me brick function all into one function, but It ends up only working for one of the blocks. It creates a block, then the block goes around me, in a never ending loop, and it never moves onto the next block!

Can Someone please Help me?

Thank you for taking the time and reading. I would appreciate it if you would PM the answer to me, then Comment saying "PM-ed", but you dont have to. Thanks again for reading!

0
You probably need a wait function in between lines 8 & 9. (Or somewhere in the for loops.) Redbullusa 1580 — 8y
0
ok I'll try that Dr_Doge 100 — 8y
0
that didt work sadly Dr_Doge 100 — 8y

Answer this question