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

How Do I changeState of a humanoid using Server Scripts?

Asked by 4 years ago

I know how to change it using Humanoid:ChangeState() but it won't do anything for me in a server script

game.Workspace.Part.Touched:Connect(function(touch)
    Humanoid = touch.Parent:FindFirstChildWhichIsA('Humanoid')
    if Humanoid then

        Humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll)
            --The next few lines is just to disable other statesofhumanoid
            Humanoid:SetStateEnabled('Running',false)
            Humanoid:SetStateEnabled('RunningNoPhysics',false)
            Humanoid:SetStateEnabled('Climbing',false)
            Humanoid:SetStateEnabled('GettingUp',false)
            Humanoid:SetStateEnabled('Jumping',false)

            print('asd')
    end
end)



This isn't working you can try it out with your self using a server script in workspace and putting a part named part

is there any way I can get it to work with server scripts?

0
get a server script fireClient() TheluaBanana 946 — 4y

Answer this question