I am attempting to make a ground slam ability using raycast to determine if the player is in the air but it does not function correctly and determines that a player is off the ground if punch and they are at the lowest part of their jump, when in reality they shouldn’t be able to ground slam at all because the height limit is higher than they can jump
It doesn’t look like the root part ever gets above 8 studs off the baseplate. I think it’s working as intended because nothing looks wrong with the code. Also the in the if statement you can just say
if Raycast then
because nil is falsy. Also because nil is falsy, you can say