So I’m trying to make the wheel on my ship rotate. The wheel is attached to the ship using a hinge constraint so that it stays connected to the ship when it moves. My problem is that I need to make it rotate at a constant rate where I can measure the time, which makes me unable to use body gyro. I tried using tween service to make it rotate, but it doesn’t seem to rotate when connected to a hinge constraint. What should I do?
You can tween the CFrame of the wheel. If you were trying to tween the oreintation of the wheel it wouldn’t work since the TweenService doesn’t support such things.
Sorry, when I said I rotated it I meant I tweened it using CFrame. It still doesn’t rotate when connected to ship using a hinge constraint, but it does whenever there isn’t a hinge. Is there a way I can use body gyro to rotate it at a constant rate that I can measure? If not how else can I rotate it?
Here is the wheel connected to the ship by a hinge constraint.
do this
for i=1,360 do
shipwheel.CFrame = shipwheel.CFrame * CFrame.Angles(math.rad(i), 0, 0)
game:GetService("RunService").Heartbeat:wait() -- if on client, if server use Stepped
end
1 Like