This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts.
Checks whether a
Player owns a
articles/Badges Special Game Awards|badge given their
Player/UserId|UserId and the badge ID. This query can only be made under the following conditions:
- This function must be called from a server-side
ModuleScripteventually required by a
Script, not from a
- The player in question must be present in the server.
Any badge for any game can be queried, no matter who created the badge or which game it is used for.
The badge ID of the badge whose ownership will be checked.
A boolean indicating if the specified user has the specified badge.
Checking Earned Badges
The following script waits for any player to enter the game and checks if they own a specific badge. This is useful for creating a
articles/Collision Filtering Team Doors|restricted area or
articles/Teleporting Between Places|teleporter that only works if a player owns a special badge.