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

Humanoid:ChangeState() not working, need some help please?

Asked by 4 years ago

I attempted to make the player who steps on the script's Parent (a Part in workspace) go into the HumanoidStateType.Ragdoll. Here's the script:

script.Parent.Touched:Connect(function(part)
    local parent = part.Parent 
    local human = parent:FindFirstChild("Humanoid") 
    if human then 
        human:ChangeState(Enum.HumanoidStateType.Ragdoll)
    end
end)

The script doesn't work, even when using a repeat wait()... until method

0
Due to the default behavior of the Humanoid some states will automatically be changed when set to. pidgey 548 — 4y
0
oh ok. User#28017 0 — 4y
0
Why do you want the Humanoid to go into that state anyways? Refined_Arcanite 21 — 4y
0
im trying to make a slide User#28017 0 — 4y
View all comments (5 more)
0
how would I make a player ragdoll. I can't find any tutorials on yt or anything in studio to use. User#28017 0 — 4y
0
~~~~~~~~~~~~~~~~~ human.Sit = true ~~~~~~~~~~~~~~~~~ AwesomeMrBird -79 — 4y
0
~~~~~~~~~~~~~~~~~ Humanoid.Sit = true ~~~~~~~~~~~~~~~~~ AwesomeMrBird -79 — 4y
0
~~~~~~~~~~~~~~~~~ Humanoid.Sit = true ~~~~~~~~~~~~~~~~~ AwesomeMrBird -79 — 4y
0
~~~~~~~~~~~~~~~~~ Humanoid.Sit = true ~~~~~~~~~~~~~~~~~ AwesomeMrBird -79 — 4y

2 answers

Log in to vote
1
Answered by 4 years ago

Solution

You can only change states with a local script. If you want to force a state, you'll need to keep changing it.

game:GetService('RunService').RenderStepped:Connect(function()
    Humanoid:ChangeState('Swimming')
end)

Ragdoll Resources

I've recently used Tom_atoes Ragdoll script, it works great especially if you know how it works: https://devforum.roblox.com/t/tom-atoes-customisable-ragdoll/259927

This property released a while back. Many developers in the comments posted their code for it, you can use it: https://devforum.roblox.com/t/humanoid-breakjointsondeath/252053

Ad
Log in to vote
0
Answered by 4 years ago
Humanoid.Sit = true

Answer this question