Hello, I have a question on regarding making a homing missile nowadays as of using VectorForce or Linear Force. I have some experience on creating projectiles but haven’t made any after the BodyForce deprecation
I was trying to make the missile having no gravity on itself, but I can’t seem to find the right alternative on the now deprecated BodyForce. I’ve reread the docs five or four times and still can’t fix it either way
Currently my projectile is acting like a humanoid jumping up and down. (it’s eerie to see a non humanoid do that)
here’s the script:
local missile = script.Parent
local target = game.Workspace.mockhumanoid
local v = 40 -- velocity
local sd = 2.5
missile.VectorForce.Force = Vector3.new(0, 10000, 0)
local function Move(step)
local d = (missile.Position - target.Position).Magnitude -- d is distance
if d > sd then
missile.CFrame = missile.CFrame:Lerp(target.CFrame, step * v/d)
missile.CFrame = CFrame.new(missile.Position, target.Position) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0))
end
end
game:GetService("RunService").Stepped:Connect(function(time, step)
Move(step)
end)
here’s the photo:
do any of you guys know what is the problem?