How to make a Part look at a position slowly

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

1 Like

You could try adjusting your script like this:

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.

what is this??? Can you explain pls

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

I was thinking about a completely different scripting language when I posted that, here is the correct version of that line:

local rotation = CFrame.lookAt(Vector3.new(), direction)

he wants it to be smooth, use CFrame.lookAt and lerping to do a smooth animation