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

Humanoid State Type Not Changing Properly?

Asked by 5 years ago

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

0
does it only prints to specifically freefall or it's random through all modes? Astralyst 389 — 5y
0
you could try making an check if the current state isn't physics, then change it to physics Astralyst 389 — 5y
0
if humanoid:GetState() ~= Enum.HumanoidStateType.Physics then // humanoid:ChangeState(Enum.HumanoidStateType.Physics) Astralyst 389 — 5y
0
try removing the spaces that you added between the brackets and see if that changes anything Astralyst 389 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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

Ad

Answer this question