Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
3

How to keep rotation in a CFrame?

Asked by
RubenKan 3436 Moderation Voter Administrator Community Moderator
5 years ago

When i use a CFrame, it always comes back into a certain rotation, even if i use:

script.Parent.CFrame = CFrame.new(script.Parent.Position) * CFrame.Angles(script.Parent.Rotation)

Can anyone help me / tell me why this does not work?

2 answers

Log in to vote
1
Answered by 5 years ago
local vect = Vector3.new(0,0,0)
script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(vect)
Ad
Log in to vote
0
Answered by
Frostftw 130
5 years ago

Below will spin the part around in circles,

script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0,math.rad(2),0)

Answer this question