In this script, I put a linear velocity in the player(for a roll script), and im trying to delete it when the player gets in the air.
It works the first time, then after that it always says the FloorMaterial is air when it is not(even when the player is on the ground). This is in a server script from a remote event. I need help with this because I am very confused.
Are you using a custom character/rig?
- When the
Humanoid
is not standing on a floor, the value of this property will be set to Air .
- This occurs because Enum properties cannot have an empty value.
- This can cause some confusion if a part has its material is set to Air, though in practice, parts are not supposed to use that material in the first place.
- The
Humanoid's
character model must be able to collide with the floor, or else it will not be detected.
- You cannot test if the
Humanoid
is swimming with this property. You should instead use theHumanoid's
Humanoid:GetState
function.
1 Like
Im not using a rig or a custom character
1 Like
what does it mean by can cause some confusion if a part has its Material set to Air
parts are not supposed to use that material in the first place.
You should run print(Humanoid:GetState() … Humanoid.FloorMaterial()) just for common debug
Aside from that im not exactly sure jus play around wit it
FloorMaterial is not updating on the server anymore (I tested it in my game). Maybe that’s why your script is not working. However, it does still work on the server in studio test mode for some odd reason.
1 Like