What I want to do is make a missile that follows the player using linear velocity and explodes upon contact. However, I’ve noticed that the missile experiences significant lag, so I set the missile’s network owner to the player, but then it began moving in a circular motion. Why does this happen?
here is my code on server, it’s very simple:
local rs = game:GetService("RunService")
task.wait(5)
local player = game.Players:GetPlayers()[1]
local bigPart = workspace.BigPart
local flyPart = workspace.FlyingPart
flyPart:SetNetworkOwner(player)
rs.Heartbeat:Connect(function(deltaTime: number)
local v = flyPart.LinearVelocity
v.VectorVelocity = (bigPart.Position - flyPart.Position).Unit * 150
end)
So, I really can’t figure it out. If anyone has any ideas, please do share them with me. Thank you.