Your raycast is probably hitting your own player.

The problem
It hits the player first.
bool IsGrounded(){ return Physics.Raycast( transform.position, Vector3.down, 1.1f );}
The ray starts inside the player's own collider, so it hits the player before the ground.
The fix
Only hit what you're looking for.
A LayerMask tells the raycast which layers it's allowed to hit. Everything else is invisible to it.
Raycast+LayerMask=ground only
The fix in code
Pass a mask.
[SerializeField] LayerMask groundMask; bool IsGrounded(){ return Physics.Raycast( transform.position, Vector3.down, out RaycastHit hit, 1.1f, groundMask );}
Tick the Ground layer in the Inspector. The player's own collider is never considered.
Don't forget
Put the ground on its layer.
The mask only works if your ground objects actually use that layer.
- Create a layer
- Ground
- Assign it
- floors, terrain, platforms
- Tick it
- in groundMask
The rule
Every raycast gets a mask.
- Mask field
- [SerializeField] LayerMask
- Pass it
- last argument
- Ground objects
- on the Ground layer