So I want the part called the player to look at the destination smoothly not instantly to lerp over and look at it, but my script for some reason is not working and I dont know why.
local RunService = game:GetService("RunService")
local Player = workspace:WaitForChild("Player")
local Destination = workspace:WaitForChild("Destination")
local function Heartbeat(DeltaTime)
local Delta = Destination.Position - Player.Position
local Theta = Delta.Unit * DeltaTime
Player.CFrame = CFrame.lookAt(Player.Position, Player.Position + Theta)
return
end
RunService.Heartbeat:Connect(Heartbeat)
Can someone tell me why?