Character HipHeight Delay

  1. What do you want to achieve? Keep it simple and clear!
    I want to fix my hip height delay

  2. What is the issue? Include screenshots / videos if possible!
    In studio it looks fine, here is a video of it:

and here’s a video of it in the actual game:

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I have tried YT and Devforum.

Btw here’s my code its a server script that runs when a remote event gets fired when the player presses C

script.Parent.CrouchEvent.OnServerEvent:Connect(function(player, Value)
	if Value == "Crouch" then
		player.Character.Humanoid.HipHeight = 1
		player.Character.HumanoidRootPart.CanCollide = false
		player.Character.Humanoid.WalkSpeed = 7
		player.Character.Humanoid.JumpHeight = 0
    end
end)
1 Like

did you tried removing the “player.Character.Humanoid.HipHeight = 1” line?

1 Like

ill try rn but i think i need that line of code, but ill try and let u know

1 Like

I removed it but now i can’t go under obstacles which is what i need

hm, so uh you can try making an animation which gives the hipheight time to set i guess

1 Like

The difference is due to ping.
When in studio, you are running the server on your own PC, and as such, have no delay.
When you hop in game, you will have some amount of delay.
The only way to fix this is to not use a remote event, and instead run this code on the client.
This may seem as a bad idea, as using remote events is usually safer, however it is necessary if you want to rid yourself of this delay.

1 Like

Thanks man it worked!

maximumcharacters

Thanks for the help btw

maximumcharacters

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