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

Why isn't this CFraming script working?

while wait() do
	script.Parent.CFrame = CFrame.new(script.Parent.CFrame)
*CFrame.Angles(math.rad(math.random()*100),math.rad(math.random()*100),math.rad(math.random()*100))
end

Will not rotate at all. That's all that's happening. Nothing. It's a 3 lined script, I tried to fit all of the script on. Nothing is spelled incorrectly. I used math.rad and math.random()*100. I used a while wait() do end instead of while true do wait() end to make it shorter.

1 answer

✓ Accepted answer

CFrame.new takes a Vector3 value so:

while wait() do
    script.Parent.CFrame = CFrame.new(script.Parent.Position)
*CFrame.Angles(math.rad(math.random()*100),math.rad(math.random()*100),math.rad(math.random()*100))
end

or

while wait() do
    script.Parent.CFrame = script.Parent.CFrame
*CFrame.Angles(math.rad(math.random()*100),math.rad(math.random()*100),math.rad(math.random()*100))
end

1 comment

0

Why did this glitch though?

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