How would I "freeze" a character

How would I make it so that a character cannot move?
I want it so that:

  • The player cannot walk around
  • The player cannot jump (it can still fall)
  • The player’s Walkspeed and JumpPower stay the same

Also, I’m trying to use new methods, so I’d like to avoid using Body Movers.

Any help is greatly appreciated!

2 Likes

Just set the WalkSpeed to 0, ad the JumpPower to 0 as well. That’s pretty much it

Sorry, I should have been more specific. I also don’t want to edit the WalkSpeed and JumpPower, as there is another script that can effect it.

To achieve this you will need to anchor the player; once you want them to walk and jump again, unanchor the player.

I’m trying to figure out how to freeze the player while in midair without them floating.

Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running, false)

Try this

5 Likes

I’m pretty sure this isn’t what he wants. I think he wants the character to stay in its current position and not be changed by animations. (No anchoring either)

2 Likes

This works, however it seems to only be working on the client. For now I’ll use it until I have a better solution.

1 Like

You can disable the players controls and then re enable them

local Player = game.Players.LocalPlayer
local Controls = require(Player.PlayersScripts.PlayerModule):GetControls()
Controls:Disable()
2 Likes