Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 1 year ago

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?

0
maybe adding a weld can help if you just want players stop moving lamgogo 56 — 1y

2 answers

Log in to vote
1
Answered by 1 year ago

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()`

0
thanks. i’ll try that later T3_MasterGamer 2189 — 1y
Ad
Log in to vote
0
Answered by 1 year ago

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

0
im talking about disabling the mobile thumbstick/joystick but i also tried that tho. T3_MasterGamer 2189 — 1y

Answer this question