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

Humanoid State Type Not Changing Properly?

What's good y'all! So I'm trying to set the HumanoidStateType to Physics, but for whatever reason roblox keeps changing it to other Modes. Is there a way I can stop this? This is what I use currently:

	char.Humanoid:ChangeState( Enum.HumanoidStateType.Physics )
	print( "Changed Humanoid to: ".. tostring(char.Humanoid:GetState()) )

And this is what it prints:

Changed Humanoid to: Enum.HumanoidStateType.Freefall

5 comments

0

does it only prints to specifically freefall or it's random through all modes?

0

you could try making an check if the current state isn't physics, then change it to physics

0

if humanoid:GetState() ~= Enum.HumanoidStateType.Physics then // humanoid:ChangeState(Enum.HumanoidStateType.Physics)

0

try removing the spaces that you added between the brackets and see if that changes anything

1 answer

Listen with open ears, TreySoWavvy, first of all.

char.Humanoid:ChangeState(16) -- that's the shortcut way of doing it

BUT BEFORE THAT you will read this:

The Humanoid doesn’t apply any force on its own. (Unending PlatformStand) Has to be unset manually

Right from the wiki I didn't make it up

So another way of doing it can be

while true do
char.Humanoid.PlatformStand = true 
wait(.1)
end

But you tell me what's right or wrong Einstein

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