Hi, I have been trying non stop to find the answer to this question but nothing that I have tried has worked. I am trying to make a "guided missile" like projectile that will follow the mouse. But it does not work instead the projectile just floats to a random position.
I am using remote function for this script.
So here is the local script
remoteFunction:InvokeServer()
Shoot()
wait(0.5)
--mouse.TargetFilter(projectile)
--mouse.TargetFilter(game.Workspace[player.Name.."projectile"])
for i = 1,60,1 do
bodyposition.Position = mouse.Hit.Position
wait(1)
end
And here is the server script
local bodyposition = Instance.new("BodyPosition")
bodyposition.Parent = projectile
bodyposition.MaxForce = Vector3.new(1000,1000,1000)
bodyposition.P = 1000
bodyposition.D = 1000
return bodyposition, projectile
end)
Thanks for your time :D

6 comments
I did that but it still not following mouse?
I did that but it still not following mouse?
I am going to edit it. Just copy what I do.
o9k
I figured it out but thx for help
I forgot to edit it. Lol, sorry!