I'm trying to make a part with BodyGyro face another part, but whenever I try to edit the code of where it's facing (CFrame I'm Assuming), it just keeps facing the same way.
From the Wiki:
local b = Instance.new('BodyGyro') b.maxTorque = Vector3.new(math.huge, math.huge, math.huge) b.cframe = CFrame.new(0, 10, 0) b.Parent = Workspace.Part
Anyone know what I'm doing wrong?
You have to use CFrame.Angles for a rotational CFrame, so
local b = Instance.new('BodyGyro') b.Parent = Workspace.Part b.maxTorque = Vector3.new(math.huge, math.huge, math.huge) b.CFrame = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.rad(math.pi()), 0)
That will turn it 180 degrees around on it's y axis, as if you stuck a hinge right through the part from top to bottom. Best way I could explain it.