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
wait(2)
badgeId = 236025088
GPS = game:GetService("BadgeService")
function respawned(char)
local player = game.Players:FindFirstChild(char.Name)
if char:FindFirstChild("Head") ~= nil then
print("It's a Player!")
if GPS:UserHasBadge(player, badgeId) then
print("Has GPID")
for i=1,100 do
print("MLG")
end
else
print("No Ba")
end
end
end
game.Workspace.ChildAdded:connect(respawned)

1 comment
If you feel like this question no longer has any purpose, you can find a 'delete' button on the right.