How can I block Humanoid becoming ragdoll status? also GettingUpStatus?
I’m making zero gravity game but ragdoll and getting up is messing up (it boosts character up when getting up also lose control)
1 Like
Run this on a LocalScript in StarterCharacterScripts
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:FindFirstChild("Humanoid") or Character:WaitForChild("Humanoid")
local DisabledStates = {
Enum.HumanoidStateType.Ragdoll;
}
for _,state in ipairs(DisabledStates) do
Humanoid:SetStateEnabled(state,false)
end
2 Likes
If you’re trying to disable certain states, you can get the humanoid of the characters you want to disable certain states and use SetStateEnabled
Where the first parameter is the state and the 2nd if you want it enabled or not
Example
Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,false) -- This makes it so the Jump state is disabled for the humanoid, meaning jumping is impossible since they are not able to enter it
Edit: @overflowed gave a good way of doing it if you are uncertain as to how you can achieve, which can tie in as another example with my explanation
1 Like