Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

GUI remove with Badge?

Hey guys!

I need a script that removes a GUI if the player already owns a badge! If anyone can see a fix for this, that would be great!

BadgeId = 160235804
 
game.Players.PlayerAdded:connect(function(p)
if GamePassService:PlayerHasPass(player, passid) then
script.Parent.Parent.Spawn.Visible = true
else
script.Parent:remove()
wait(.01)
    end
end)

game.Workspace.ChildAdded:connect(respawned)

Cheers,

Michael

1 answer

✓ Accepted answer
BadgeId = 160235804

game.Players.PlayerAdded:connect(function(p)
if game:GetService("BadgeService"):UserHasBadge(p.userId, BadgeId) then
script.Parent.Parent.Spawn.Visible = true
else
script.Parent:remove()
wait(.01)
    end
end)

game.Workspace.ChildAdded:connect(respawned)

1 comment

0

Cheers again, thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.