Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Trying to check if a player has this badge? FIXED

Asked by
ItsMeKlc 235 Moderation Voter
10 years ago

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

01wait(2)
02 
03 
04badgeId  = 236025088
05 
06 
07 
08 
09GPS = game:GetService("BadgeService")
10function respawned(char)
11local player = game.Players:FindFirstChild(char.Name)
12if char:FindFirstChild("Head") ~= nil then
13print("It's a Player!")
14if GPS:UserHasBadge(player, badgeId) then
15print("Has GPID")     
View all 24 lines...
0
If you feel like this question no longer has any purpose, you can find a 'delete' button on the right. Perci1 4988 — 10y

Answer this question