Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to disable walking and jumping without changing the Humanoid properties?

Hello. I'm trying to disable walking and jumping whenever a player gets jump scared on all platforms. It also includes disabling the thumbstick/joystick and jump button. I tried disabling HumanoidStateType.Jumping, and it works, but when I set the Walk speed to 0, it doesn't disable the thumbstick/joystick. I tried disabling HumanoidStateType.Running but it's still walking. Any ideas on how?

1 comment

0

maybe adding a weld can help if you just want players stop moving

2 answers

✓ Accepted answer

there is a GetControl function in the PlayerModule that you can use to disable all character controls

local player= game:GetService("Players").LocalPlayer
local controls= require(LocalPlayer.PlayerScripts.PlayerModule):GetControls()

controls:Disable()`

1 comment

0

thanks. i’ll try that later

One method you could use is to anchor the character's HumanoidRootPart. This will stop the character from being able to move.

1 comment

0

im talking about disabling the mobile thumbstick/joystick but i also tried that tho.

This discussion is preserved as it was. New answers, comments, and votes are closed.