GreenHell Modding
  • Welcome to the GreenHell Modding docs!
  • TUTORIALS
    • How to install GreenHellModLoader
      • Troubleshooting
    • How to install a mod
    • Mods in multiplayer
  • MODDING TUTORIALS
    • How to create a mod project
      • The modinfo.json file
    • How to create an AssetBundle
  • CLIENT - CODE EXAMPLES
    • Reading private variables
    • Modifying private variables
    • Accessing the player instance
    • Giving items to a player
    • Modifying the inventory max weight
    • Unlocking everything in the Notepad
    • Disabling player movement
    • Toggling the mouse/cursor
    • Printing to the console
  • WEBSITE
    • Slugs
Powered by GitBook
On this page

Was this helpful?

  1. CLIENT - CODE EXAMPLES

Disabling player movement

In order to block/disable the player movement we can use 2 methods from the Player class.

// Blocking the movement and rotation
Player.Get().BlockMoves();
Player.Get().BlockRotation();

// Unblocking the movement and rotation
Player.Get().UnblockMoves();
Player.Get().UnblockRotation();
PreviousUnlocking everything in the NotepadNextToggling the mouse/cursor

Last updated 5 years ago

Was this helpful?