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

Rotating a part?

Asked by 8 years ago

Hi,

I have this script. It's in a model, which is in a model, which is in another model. For some reason, it only rotates a little bit. I tried it on the same model but not with the others, and it worked fine. Any help?

script.Parent.PrimaryPart = script.Parent.MainHose.LM

while true do
    script.Parent:SetPrimaryPartCFrame(script.Parent.PrimaryPart.CFrame * CFrame.new(0, 0, -0.1) * CFrame.Angles(0.1,0,0))
    wait()
end

Thanks.

0
its may be interfering with something else ghosteffectz 115 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Try using eulerangles like this

while true do
    script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0.1,0.1,0.1)
    wait(0.02)
end

Hope this helped

0
Same problem. Would it help to have a picture? http://prntscr.com/80nxzl AgentL3r 40 — 8y
0
fromEulerAnglesXYZ is the same as Angles, you just need to do math.rad(.1) instead of .1 EzraNehemiah_TF2 3552 — 8y
0
Ahh... ghosteffectz 115 — 8y
Ad

Answer this question