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

Why doesn't my GUI become visible if the player owns a Gamepass?

Asked by 10 years ago

Hey guys,

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

01BadgeId = 160235804
02 
03game.Players.PlayerAdded:connect(function(p)
04if game:GetService("BadgeService"):UserHasBadge(p.userId, BadgeId) then
05script.Parent.Parent.Spawn.Visible = true
06script.Parent.Parent.Parent.OwnedBikes.Bike2.Visible = true
07else
08script.Parent:remove()
09wait(.01)
10    end
11end)
12 
13game.Workspace.ChildAdded:connect(respawned)

I don't see a problem with it 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 10 years ago

You forgot to add the "respawned" function.

0
Seeing that you signed up to Scripting Helpers today, most people tend to give edits aswell as the changes to the scripts needed. Some people are noobs at scripting! Michael007800 144 — 10y
0
True, but I didn't start helping people on the forums yesterday. All I did was follow the rules. The requirements of giving an answer was to give an explanation, thats exactly what I did. I appreciate your help though! iUnEarthly 85 — 10y
Ad

Answer this question