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

Is there a way to setprimarypartcframecframe rotaion with vector3?

I really need this and tryed different ways... I can't check out wikia cuz it doesn't work. Most ways are setting lookat position, not rotation, or sertting position of model to 0, 0, 0

Any ideas?

4 comments

0

CFrame.new(Vector3.new())

0

It sets position, not rotation.

0

Can you not repost the same question.

0

Part and model are different things.

1 answer

There are multiple ways

define both then add CFrame.new(x, y, z) * CFrame.fromEulerAnglesXYZ() Note that you may want to consider converting degrees to radians first CFrame.fromEulerAngles(math.rad(x), math.rad(y), math.rad(z))

OR

Define the rotation directly CFrame.new(x, y, z, qx, qy, qz, qw) Note that you need to learn quarternions to use this

OR

define position and another position to "look" at CFrame.new(Vector3 Position, Vector3 Other Position)

1 comment

0

Man, I jnow those ways, but they also set MODEL's position to 0, 0, 0 (Default)... And also, I already figured how to avoid that in my case.

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