IsPlayerInteracting
isPlayerInteracting
Checks whether a player currently has any active replicated interaction.
Syntax
bool isPlayerInteracting(int playerId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
Returns
Returns true while an interaction is active; otherwise returns false.
Examples
Block an action while the player is busy:
if isPlayerInteracting(playerId) then
outputChatBox("Finish the current interaction first.", playerId)
return
end
Notes
- Available only in server-side resource scripts.
- This covers every interaction kind, including mining and sitting.