How do I make it so the Z axis on the player wont change?

I have gone to many topic on this but they dont seem to work.

I need the player to stay at the -1.193 Y axis the whole time. But if they jump due to roblox physics it will push them so how would I go about this?

Change the velocity on the humanoid rootpart for z to be math.huge. sorry if confusing my head hurts lol.

Um, in case I was kinda dumb and lacked brain power how would I do this?

Srry even though Im kinda advanced I have this thing where I cant understand stuff with out really seeing it.
Sorry to bother you

wait actually don’t use that one sec I’m making something else

1 Like

closest thing I can get:

game:GetService("RunService").Heartbeat:Connect(function()
	script.Parent.Velocity = Vector3.new(script.Parent.Velocity.X, script.Parent.Velocity.Y, 0)
end)

Am I suppose to add some velocity?
Cause um I get the error velocity is not a valid member of the character

You can only do the velocity of the primary part, the HumanoidRootPart.

Ok this worked. . . BUT . . . danggit theres a but . . .
I the walking animation keeps playing