try using player.pflags, here is the constants (https://wiki.srb2.org/wiki/Constants#Internal_player_flags_(PF_*)), you can use PF_SPINNING in this case, like: player.pflags = $|PF_SPINNING and also don't forget to put the check if the player is already spinning if not(player.pflags & PF_SPINNING)