Hello, I have been making a boat recently, and I want to be able to accelerate the turning speed of the boat. Basically, when you are holding A or D it turns the boat. I can control the speed of it turning, but I don’t know how to make it faster the longer the boat is being turned. My current script for turning the boat:
local turnSpeed = 1.5
while wait() do
BoatSeat.AssemblyAngularVelocity = Vector3.new(0,-BoatSeat.Steer/turnSpeed,0)
end
Right now, the higher the turn speed the slower it turns. If I can detect the rotation of the turn speed, I can keep subtracting a small number from the turn speed variable to make it turn faster and when the play stops turning the boat, it will reset back to 1.5. Is there anyway to detect the speed of rotation of an object? If so, please help me since I have been working on this for a long time. Thanks!
I literally said that. I’m trying to know how long is a player rotating the boat already. Because I need to make the boat turn faster and faster whenv they are turning it. Thanks!
same exact code but instead of changing the assembly angular velocity you change a torque force that you added to some part in the boat
to add a torque force you add an attachment where you wish to rotate it (wont matter where it is if you turn on apply at center of mass) then add a torque force with its attacment0 being equal to that attachment you just made
now add a random value in the velocity Y spot so a blue line and circle appears, then rotate your attachment so the circle is flat with the boat and the line is facing down
after that the script will be the same like i said at the top of this message
local turnSpeed = 1.5
while wait() do
BoatSeat.Torque.Torque = Vector3.new(0,-BoatSeat.Steer/turnSpeed,0)
end
I also tried this:
local turnSpeed = 1.5
while wait() do
if BoatSeat.Steer==1 then
BoatSeat.Torque.Torque = Vector3.new(0,0,10000)
end
if BoatSeat.Steer==-1 then
BoatSeat.Torque.Torque = Vector3.new(10000,0,0)
end
if BoatSeat.Steer==0 then
BoatSeat.Torque.Torque = Vector3.new(0,0,0)
end
end