Roblox is not detecting PlatformStanding

Hello, I am trying to make the camera type change according to the HumanoidStateType and for some reason it’s not even detecting when my roblox character changes states to PlatformStanding.
No, I have not disabled platformstanding anywhere in this place and to be sure I put this before it:

Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding,true)

and it still didn’t work.

Here is a video of the problem :

https://gyazo.com/d7159d889b10d93ef99abd21408d7b20

As you can see I clearly jumped and landed and remained still and it thinks I am Running while my velocity is litterally 0.
Even when I run and stop it will still think i’m running
Every other state except from PlatformStanding works

And here is my code :

function BaseCamera:UpdateState(old,new)
	print("Old : "..tostring(old))
	print("New : "..tostring(new))
	
	if new == Enum.HumanoidStateType.Running or new == Enum.HumanoidStateType.RunningNoPhysics then
		self.RotationType = Enum.RotationType.MovementRelative
	else
		self.RotationType = Enum.RotationType.CameraRelative
	end
end

hum.StateChanged:Connect(function(old,new)
	BaseCamera:UpdateState(old,new)
end)

This is located in StarterPlayerScripts → PlayerModule → CameraModule → BaseCamera.

It’s located here because it’s convenient to keep it in here as i’m manipulating the rotation of the camera.

If you have an idea, please let me know

5 Likes

You need to use the Humanoid.PlatformStand property in order to make the state of the humanoid to Enum.HumanoidStateType.PlatformStanding.
Changing the state to Enum.HumanoidStateType.PlatformStanding doesn’t work for some reason.

2 Likes

Yes but my problem isn’t the fact that I can’t change the state to PlatformStanding manually

it’s the fact that roblox should automatically change it’s state to PlatformStanding when you stand still like every other state but it’s not doing that

2 Likes

Sorry, I misunderstood the question.

There is no idle state, whenever the player stands still it remains in the same state as it was when moving, Enum.HumanoidStateType.Running.

I do not understand why Roblox should automatically change the player to the state Enum.HumanoidStateType.PlatformStanding when standing still, as Roblox has never done that previously.

If you want that behavior, you should implement it yourself using Humanoid.MoveDirection to see if they are standing still, and then setting the Humanoid.PlatformStand property to true.

1 Like

It used to do that for as long as I remember. Maybe they made an update and changed it. I’ll try to do individual events for both states or do a single event and check for Velocity

It’s not working. I even put a while loop and printed the humanoid’s PlatformStand and it’s always false even when i’m standing still.

https://gyazo.com/9e3a26cedf84873ec53b8dd9e362fe7c

PlatformStand is a normal HumanoidStateType anyways so it automatically changes just like every other state.

(I also tried this in a fresh new game and it doesn’t work)

Can you show your while loop code? What are you trying to do?

Yes, you are correct with that Enum.HumanoidStateType.PlatformStanding will change automatically after a while to be back to Enum.HumanoidStateType.Running, but you will never naturally enter it when playing the game normally, it needs to be done by your code.

while wait() do
	print(hum.PlatformStand)
end

PlatformStand is a normal state though I don’t see why ROBLOX would automatically change states for every single other state except PlatformStand

1 Like

Also, even when i change to PlatformStand it immediately switches back to running EVEN when i’m standing still.

1 Like

I also even have a while loop doing the exact same thing for running and it prints that your player is running even when you are standing still!

while wait() do
	print(hum.Running)
end

https://gyazo.com/94e83a84fe3adf9e102d561017e52452

I did all this in a fresh new game you can even try it yourself

1 Like

Roblox does not change the character states to random ones, they are triggered by specific actions.
Enum.HumanoidStateType.PlatformStanding never has been set by standing still.

I am confused about what you are trying to achieve, could you please elaborate?

2 Likes

Animations are performed locally. Is this script on the server?
There was an update in August(ish) that ‘broke’ the way that Motor6Ds were being handled across server/local interfaces. Might have something to do with the way you were used to it working.

2 Likes

It’s not random tho. PlatformStanding is the official Humanoid state that is meant to be triggered when your character is standing still. It would not be logical to expect your humanoidstatetype to be Running while your character is not Running.

All I want is to detect the character changing states to PlatformStanding and running a command accordingly. But it is litterally impossible to do so now. I think ROBLOX broke PlatformStanding with a recent update because it was always working for me.

1 Like

Hello, thanks for your response but my initial question had nothing to do with animations. My problem was that ROBLOX is not allowing me to detect or switch to the HumanoidStateType “PlatformStanding” at all.

1 Like

Can you cite your source for “PlatformStanding is the official Humanoid state that is meant to be triggered when your character is standing still.”?

I sincerely believe you’re confused about something else, as this is what happens when you enable the Humanoid.PlatformStand property:
8nFJphDdpW
Ignore the bouncing in that gif, that’s just due to the CustomPhysicalProperties of the grass.

This is the way it has been for years.

1 Like

To add to this, I did a while loop printing the humanoidstatetype and it prints everything but PlatformStanding

https://gyazo.com/df27dce9fec1d90e6555642cfcfd7e1a

1 Like

So the official state type for Standing still is Running and the PlatformStanding state is just there randomly? How am I going to detect that the player is standing still without extremely fast loop checks on velocity or events when the velocity changes.

I don’t see that being very performant?

1 Like

Enum.HumanoidStateType.PlatformStanding does not get activated randomly.

You can use Humanoid.MoveDirection to see if the player is standing still, as if they are not moving the Humanoid.MoveDirection will be 0, 0, 0.

Just read from the Humanoid.MoveDirection, and use the Magnitude property of Vector3 to see if it is 0, and if it is, you know the player is standing still.

1 Like

So the description of PlatformStand is: "When true, the Humanoid is in a state where it is free-falling and cannot move. This state behaves similar to sitting, except that jumping does not free the humanoid from the state.

The now-deprecated SkateboardPlatform puts the Humanoid into this state, much like how a Seat causes a sitting state."
Also, “When altering the Humanoid of a player, this should be done from a LocalScript ran by that player”.

So you are trying to detect the ‘idle’ animation?

1 Like