Can't check if humanoid is Freefalling if PlatformStanding?

I am creating a mechanic where you can throw people into the void for points. When you throw/let go of a player, they are put into PlatformStand for a while.
I check if the player that was thrown if they are freefalling so that I can then check if they are in the void.

My problem here is that I can’t detect if a player’s character is Freefalling if they are in PlatformStand. How can I fix this?

The Humanoid cannot be in two states simultaneously. Therefore if you’re looking for a system that detects whether a player fell into the void due to their own clumsy movement or if it was the doing of some player throwing them into it, you would need some sort of log to track which player threw who. To accomplish this you could create some sort of list, RecentlyThrown for example, and modify it each time a player throws another player. When a player falls into the void you can check to see if the “player that fell in” exists in the list and award the associated “player who threw them” the credit. You can also add an entry to the table of what time the throw occurred at so that a player wandering off the map a while after being thrown is not counted as the doing of the “player who threw”. Code structure might look something like:

local RecentlyThrown = {}

--Call this whenever a player is thrown by another player
function throwPlayer(dealer, receiver)
   local lastThrown = RecentlyThrown[receiver]
   if not lastThrown then
      lastThrown = {}
      RecentlyThrown[receiver] = lastThrown
   lastThrown.Dealer = dealer
   lastThrown.Receiver = receiver
   lastThrown.OccurredAt = tick()

--Call this function whenever a player falls into the void
function onFallInVoid(playerWhoFell)
   if RecentlyThrown[playerWhoFell] and (tick() - RecentlyThrown[playerWhoFell].OccuredAt) < 5 then
      --You can change the '5'. Currently this would only count players that fall into the void 5 seconds after they were thrown as the result of being thrown
      --Award RecentlyThrown[playerWhoFell].Dealer (playerWhoThrew)
1 Like

I see, thanks for the suggestion.