Trying to check if a player has this badge? FIXED
FIXED
Unlike UserHasPass(), UserHasBadge checks the player's userId, not the actual player object.
Trying to check if a player has a certain badge.
But its not working... Does anybody know why not?
output says:
Unable to cast instance to int
09 | GPS = game:GetService( "BadgeService" ) |
10 | function respawned(char) |
11 | local player = game.Players:FindFirstChild(char.Name) |
12 | if char:FindFirstChild( "Head" ) ~ = nil then |
13 | print ( "It's a Player!" ) |
14 | if GPS:UserHasBadge(player, badgeId) then |
24 | game.Workspace.ChildAdded:connect(respawned) |