Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I unset the HumanoidStateType, "Physics"?

#What I've done I changed the HumanoidStateType through ChangeState. I need to change the humanoid state to Physics which is a never ending platform stand and after a period of time I need the humanoid to be able to get back up. I've tried SetStateEnabled to try to disable Physics but it doesn't work.


#My code ####Server Script humanoid is already defined.

humanoid:ChangeState(Enum.HumanoidStateType.Physics)
wait(3)
--BELOW IS EVERYTHING I'VE TRIED TO CHANGE THE STATE BACK, NONE OF IT WORKS.
humanoid:ChangeState(Enum.HumanoidStateType.None)
humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,false)
humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll)


Thanks!

1 answer

✓ Accepted answer

Hey bro, sorry that you had to wait 3 years for this answer but I solved it.

If you turned the Physics HumanoidStateType on already with:

humanoid:ChangeState(Enum.HumanoidStateType.Physics)

you can turn it back off with the same line of code! So you just type it again as

humanoid:ChangeState(Enum.HumanoidStateType.Physics)

to turn it back off. Hope you're still on to see this answer.

Just a reminder to place this in a local script for more accurate effect. Good luck!

2 comments

0

Then add the humanoid:ChangeState(Enum.HumanoidStateType.GettingUp) right after

0

I don't even need this code anymore, but I appreciate it

This discussion is preserved as it was. New answers, comments, and votes are closed.