Hello… it’s me… again… with the same problem.
The short and sweet of it is that i want to rotate a wheel where a part’s “front” side is facing.
So far i am here. (but it is a mess and this is why i need help)
repeat
local Velocity = Vector2.new(10, 0)
local Wheel = workspace.Wheel
local _, Theta = Wheel.CFrame:ToEulerAnglesYXZ()
Theta = Theta % math.pi
Wheel.BodyAngularVelocity.AngularVelocity = Vector3.new(Velocity.X*math.cos(Theta)+Velocity.Y*math.sin(Theta), 0, Velocity.Y*math.cos(Theta)-Velocity.X*math.sin(Theta))
wait(.1)
until nil
The setup is: this script is in a part and the BodyAngularVelocity is in a cylinder in workspace named “Wheel”
If i need to rewrite the whole thing, that’s fine.