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

Why isn't this CFraming script working?

Asked by 9 years ago
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

Log in to vote
2
Answered by 9 years ago

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
0
Why did this glitch though? EzraNehemiah_TF2 3552 — 9y
Ad

Answer this question