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

Is there a way to setprimarypartcframecframe rotaion with vector3? [closed]

Asked by 6 years ago

This question already has an answer here:

How to SET parts rotation without moving it to 0, 0, 0 ?

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?

0
CFrame.new(Vector3.new()) Bucwheed 37 — 6y
0
It sets position, not rotation. Shadowman670 -4 — 6y
0
Can you not repost the same question. User#5423 17 — 6y
0
Part and model are different things. Shadowman670 -4 — 6y

Marked as Duplicate by User#5423, theCJarmy7, and xAtom_ik

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 6 years ago

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)

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. Shadowman670 -4 — 6y
Ad