# How do I make a player shoot into the air temporarily?

Hello, I am trying to shoot a player into the air a set distance for a game I am currently developing. What makes this tricky, is the fact that players will be different sizes, with some being super large. Jumping is disabled, so that affects any attempts to use a forced jump.

I have tried using force jump without much success. Body movers seem like the best choice, however I have been unable to implement them successfully and the fact that players can be different weights means that it will be trickier to make every player shoot up the same distance.

This is my current code. It is super glitchy and it doesnâ€™t allow the player to move as they are flying through the air. I donâ€™t think tweening is the way to goâ€¦

``````--make player fly up
local newPos = hum.Parent.HumanoidRootPart.Position + Vector3.new(0, gameSettings.JumpHeight, 0)
local tweenInfo = TweenInfo.new(3, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0)
local part = hum.Parent.HumanoidRootPart
local goal = {Position = newPos}
local tween = tweenService:Create(part, tweenInfo, goal)

tween:Play()
``````

Any suggestions on how to to this? Thanks!

1 Like

Just insert a body position into the humanoidrootpart, and tween the bodypositionâ€™s position. Then set the max force to (inf, inf, inf).

The issue with tweening is, you canâ€™t move, itâ€™s just a straight up and down. Unless I can tween just the Y direction or something, I donâ€™t think this would work.

You can use BodyForce or just set the Velocity of the playerâ€™s rootpart to like Vector3.new(0, 5000, 0) or rootpart.Velocity = rootpart.Velocity + Vector3.new(0, 5000, 0)

1 Like