I created a script (located in serverscriptstorage) and it is supposed to make an ImageButton and Frame visible if they own a certain gamepass. I don't know what's wrong with it; Can anyone help?
local gamepass = 382406860
while true do
if game:GetService("GamePassService"):PlayerHasPass(player, gamepass) then
script.Parent.Parent.StarterGui.ClassGui.Main.Vip.Visible = true
script.Parent.Parent.StarterGui.ClassGui.Frame.Frame1.Visible = true
end
end

4 comments
Wow! Thanks a lot!
Wait I just realized that the loop making everything visible as long as they have the pass was taken out. How could I put a loop back in? (I want them to still have the stuff visible after a respawn)
Oh! I believe CharacterAdded would help instead, because a loop will lag your game.
Thanks again!