[Release] Toggle Ragdoll w/ Custom Key Mapping

Toggle ragdoll with a chat command and custom keybinding ability

This is a toggle ragdoll script that allows for both a chat command and a player-set keybind to turn on and off a ragdoll animation.

This script makes use of the RegisterKeyMapping native which creates a new keymap that the player can set any key to of their liking. Because there is a mix between people liking keybinds and chat commands, I figured why not add both!

You won’t need to worry about changing the keybind as that’s set by the player, but if you’d like to change the chat command then just replace rdoll in: RegisterCommand and chat:addSuggestion to whatever you want. It would be preferred, if you change them, to both have the same command otherwise the chat suggestion would be useless :slightly_frowning_face:

Download the script from Github here:
▼▼▼
Download: Github [Updated link as of 8/30/2023 due to github repo changes]

Edit: I made a JavaScript version of this as well. It’s posted on the Github page under the same repository!

Hope you enjoy!

5 Likes

Thank you for share, I don’t need the ragdoll but I need to test this registerKeymapping :open_mouth: but maybe I don’t understand, with this every client can choose own key to this function, right?

1 Like

Correct. It will register a default key of your choice to everyone that first joins your server, but the client can then change said key in their keybinds. It will remember this new keybind next time they connect so they won’t have to change it every time.

For more information about this native, you can check out the native reference here and the cookbook with a sample script here

This is amazing, thank you man love u! I will test it with your script!

1 Like