Making Auto Aim Through RocketPropulsion

Hey!

I’m making a auto-aim skill for my game and I’m having some trouble getting the Projectile to go towards the nearest player.

	local function findNearestTorso(pos)
		local list = game.Workspace:GetChildren()
		local torso = nil
		local dist = 75
		local temp = nil
		local human = nil
		local temp2 = nil
		for x = 1, #list do
			temp2 = list[x]
			if (temp2.ClassName == "Model") and (temp2 ~= plr.Character)   then
				temp = temp2:findFirstChild("HumanoidRootPart")
				human = temp2:findFirstChild("Humanoid")
				if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
					if (temp.Position - plr.Character.HumanoidRootPart.Position).Magnitude < dist then
						torso = temp
						dist = (temp.Position - plr.Character.HumanoidRootPart.Position).Magnitude
					end
				end
			end
		end
		return torso
	end

	local Projectile = game.ReplicatedStorage.DokuDF.Auto:Clone()
	Projectile.Parent = workspace
	Projectile.CanCollide = false
	Projectile.Anchored = false
	Projectile.CFrame = plr.Character.HumanoidRootPart.CFrame
	local target = findNearestTorso(plr.Character.HumanoidRootPart.Position)
	
	local char = plr.Character
	local PlayerHumanoid = plr.Character:WaitForChild("HumanoidRootPart")
	local TargetHumanoid = target
	local eChar = target.Parent
	
	local AAim = Instance.new("RocketPropulsion")
	AAim.Parent = Projectile
	AAim.Target = Target
	
	AAim:Fire()


Target is not Nil so I’m having some trouble on why it is not moving.

1 Like

When using Rocket propulsion you have to adjust the properties of it in order for it to move the projectile that said you need to change MaxThrust, ThrustP,ThrustD,TurnP,TurnD and more.

I have adjusted it and it simply isn’t working the projectile just falls to the floor

You just need to keep adjusting which is what I did unit it moved the properties might need to be high or low depending on the mass and size of the object.