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:
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.
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.
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
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.
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
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.
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?
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.
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.
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.
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:
Ignore the bouncing in that gif, that’s just due to the CustomPhysicalProperties of the grass.
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.
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.
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”.