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

GUI doesn't appear when badge owned. Overlooked problem?

Asked by 9 years ago

Hey guys,

I've been wondering what I am missing in this script!

BadgeId = 160235804

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

game.Workspace.ChildAdded:connect(respawned)

I don't see a problem with it (It's a server-sided script) but it should have worked. If anyone sees a problem I've overlooked, please say!

Cheers,

Michael

1 answer

Log in to vote
0
Answered by
iNicklas 215 Moderation Voter
9 years ago

Not sure where you put the script

BadgeId = 160235804

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

Not sure.

0
You sent me a PM asking for a screenhot, so... Here it is! Michael007800 144 — 9y
0
That isn't an explanation-it clearly says to comment if you aren't going to explain how it works unmiss 337 — 9y
Ad

Answer this question