Body Velocity doesn't have vertical velocity btu then does?

Hello, I am once again trying to solve my problem with rocket jumping; however, I still cant figure it out.


	local Explosion = Instance.new("Explosion")
	Explosion.Name = "NoShake"
	Explosion.BlastRadius = Settings.BlastRadius
	Explosion.BlastPressure = 0
	Explosion.ExplosionType = Enum.ExplosionType.NoCraters
	Explosion.Position = hitPoint
	Explosion.Visible = false
	Explosion.Parent = workspace

	local HitHumanoids = {}

	Explosion.Hit:Connect(function(HitPart, HitDist)
		if HitPart then
			local Target = HitPart:FindFirstAncestorOfClass("Model")
			local TargetHumanoid = Target and Target:FindFirstChildOfClass("Humanoid")
			local TargetTorso = Target and (Target:FindFirstChild("HumanoidRootPart") or Target:FindFirstChild("Head"))
			if TargetHumanoid and TargetHumanoid.Health > 0 and TargetTorso then
				if not HitHumanoids[TargetHumanoid] then
					HitHumanoids[TargetHumanoid] = true
					local DamageThroughWall = true
					

					if TargetHumanoid.Parent.Name == script.Parent.Parent.Name then
						local Multipler = 2
						local VelocityMod = (TargetTorso.Position - Explosion.Position).Unit * 100
						local AirVelocity = TargetTorso.Velocity - Vector3.new(0, TargetTorso.Velocity.Y, 0) + Vector3.new(VelocityMod.X, 0, VelocityMod.Z)
						local TorsoFly = Instance.new("BodyVelocity")
						TorsoFly.MaxForce = Vector3.new(math.huge, 0, math.huge)
						TorsoFly.Velocity = AirVelocity
						TorsoFly.Parent = TargetTorso
						TargetTorso.Velocity = TargetTorso.Velocity + Vector3.new(0, VelocityMod.Y * Multipler, 0)
						print(TargetTorso.Velocity)
						Debris:AddItem(TorsoFly, 0.25)	

						
						end
					
				end
			end
		end
		end)

The script above that I’m using is from another script that has the same exact logic except in a different script.

(the script in question (just the logic part since everything else is the exact same)

									local Multipler = 2
									local VelocityMod = (TargetTorso.Position - Explosion.Position).Unit * 100

									local AirVelocity = TargetTorso.Velocity - Vector3.new(0, TargetTorso.Velocity.Y, 0) + Vector3.new(VelocityMod.X, 0, VelocityMod.Z)
									local TorsoFly = Instance.new("BodyVelocity")
									TorsoFly.MaxForce = Vector3.new(math.huge, 0, math.huge)
									TorsoFly.Velocity = AirVelocity
									TorsoFly.Parent = TargetTorso
									TargetTorso.Velocity = TargetTorso.Velocity + Vector3.new(0, VelocityMod.Y * Multipler, 0)
									print(TargetTorso.Velocity)
									Debris:AddItem(TorsoFly, 0.25)		

However, in this case it works?

When printing Multiplier, and the knockpower (100), it all returns the same
and when printing out the targettorsos velocity after it returns with this

image
However with the first script, when printing out the targettorso velocity, it shows up nearly the same for the Y, the only problem is that the player NEVER gets launched into the air.

Even when porting the first script into any of game, it never launches the player and its so faulty.
But the second script ALWAYS works, just not the first script.

ezgif.com-video-to-gif-converter (1)
(first scripts rocket launcher)
(second scripts rocket launcher)

2024-08-14 12-42-05

please save me from a headache I’ve been on this for the past day and today aswell.

Maybe the issue is the MaxForce of the TorsoFly being 0 on the Y axis ?

Isn’t a issue for the second script, I also changed it for the first script and it just had a really poor upwards push (it was very slow and didnt even get you higher than like 2 studs)

I don’t understand this but you could do get partsboundinbox, origin position being where the rocket striked. if any torsos are returned, then add velocity? idk, I’m kinda new to this stuff.

Thats what the first script is about. The main problem is just the body velocity just not working.

try adding print statements to check if your functions and if statements are all working.

That was the point of the screenshots after the scripts…

You should try parenting it to the HumanoidRootPart and make it massless, it may work
I don’t know much about Velocities but try also setting it on the client if it helps
Always try putting stuff in the HumanoidRootPart and not the torso

1 Like

Well BasePart.Velocity is deprecated and it is more advised to use BasePart.AssemblyLinearVelocity. Try switching first.

1 Like

how could i be so foolish…

this worked. holy crap thank you

oh sorry :pray: I was tired or smthn ig

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.