What should I use to keep the player floating at the same height as the person they’re attacking in the air?
You should use body velocity then have it so its always applying a different velocity in a attempt to make its y value the same as the player floating in the air
Are you sure a bodyvelocity would keep the player in the air at the same height as the other player?
You gotta be constantly changing it based on their position from the xz offset
Sounds weird but I think changing the hipheight of the humanoid could work.
Use Body Position to keep player afloat at a Vector3 Position of your choice. Use Body Gyro to aim the player in the direction of your choice.
Just set their character’s primary part’s position’s Y axis to the player they’re attacking:
local primaryPart = player.Character.PrimaryPart
local attackedPlayer = -- the person the player is attacking
primaryPart.Position = Vector3.new(primaryPart.Position.X, attackedPlayer.Position.Y, primaryPart.Position.Z)
BodyVelocity isn’t suitable for this, it keeps a constant velocity until you set it back to 0,0,0.
I told hhim to make it so it sets it back to the y value using the body velocity so it isnt static
A BodyPosition might be helpful. A BodyPosition keeps a basepart at a specific location, and by setting the MaxForce to something like Vecter3.new(0, largeValue, 0) you can make it not affect the x or z position of the part while keeping the height correct.