Well, I’m making a missile launcher and I’m having a headache trying to make the missile slowly rotate towards the final position. I tried to use Tween Service but Tween literally stopped my missile in mid-air… I don’t know what else to do.
Could anyone tell me what I can do to reach my goal?
Code:
local function missileLookAt(target:Vector3)
local direction = (target-currentMissile.Position).Unit
currentMissile.AssemblyLinearVelocity = direction * 900 -- This moves the missile towards the target, but does not rotate
end
local function missileLookAt(target)
local direction = (target - currentMissile.Position).Unit
local rotation = Quaternion.LookRotation(direction, Vector3.Up)
currentMissile.Rotation = rotation
currentMissile.AssemblyLinearVelocity = direction * 900
end
Not sure if this will work though, since I can’t see the rest of the script that controls your rocket launcher.
You could use an AlignOrientation using single attachment mode, set max torque to math.huge, and then change the responsiveness to however fast you like