How to change only Y Velocity without error

Im trying to manipulate only the Y velocity in my code. When its greater than zero i want it to be set back to zero, but I keep getting an error that says “Y cannot be assigned to”. How do I change only the Y velocity individually?

Code:

while freefall do
		
		local yvel = (glider.Velocity.Y / 2)
		
		 glider.Velocity = mouse.Hit.lookVector * Vector3.new(25,40 - yvel,25)
		gyro.CFrame = mouse.Hit
		
		if hrp.Velocity.Y >= 0 then
	hrp.Velocity.Y = 0 --Line where error is
	end
		wait()
		end.

Use BodyMovers or Constraints instead to manipulate the velocity properly. BodyVelocity for example will let you only apply force on the Y axis to maintain a specific velocity.

Im already using body velocity, thats what im trying to change. Is there a way to change the Y velocity of the one im already using or would I have to make a new one?

You cannot set only the one value.

hrp.Velocity = Vector3.new(hrp.Velocity.X,0,hrp.Velocity.Z)