When hooking up an Event to Hum.StateChanged the argument passed to the function is the state before the change.
for example, using this code:
local hum = script.Parent
local eve = hum.StateChanged:connect(function(state)
print("argument")
print(state)
print("method")
print(script.Parent:GetState())
end)
when I tick the PlatformStand value of hum, this function prints: Enum.HumanoidStateType.Running for the argument and prints Enum.HumanoidStateType.PlatformStanding for the method.
Then if I untick PlatformStand then it will print: Enum.HumanoidStateType.PlatformStanding for the argument and prints Enum.HumanoidStateType.Running for the method.
reproduce: insert a script with the above code into a Humanoid Object and tick PlatformStand value on the humanoid.
Is this intended? or is it a bug?