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?
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()`
One method you could use is to anchor the character's HumanoidRootPart. This will stop the character from being able to move.