PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

ReportAbuse

This function attempts to report the given Player|player for the given reason. Since this item is protected, attempting to use it in a Script or LocalScript will cause an error.

The game uses this function internally when a player interact’s with the game’s default report system. Players should use this system to report players for offensive or inappropriate behavior that does not abide by Roblox’s Terms of Service Agreement and Community Rules.

Parameters

Name Type Default Description

The Player|player being reported

The reason for reporting the player

An optional message providing more details about the reported abuse

Returns

Return Type Summary

No return


Code Samples


Report Abuse Demo

This example demonstrates that the Players/ReportAbuse function executes without error if using the Command Bar or a Plugin and errors if executed in a Script or LocalScript.

When executed in the Command Bar, this code reports the recipient Player for the specified reason along with an optional explanatory message.

-- Command bar
game.Players:WhisperChat(recipient, reason, "Player did a bad thing!") -- Submits a report against the recipient

-- LocalScript
local player = game.Players:WhisperChat("Hello World", recipient) -- Errors