script.Parent.MouseButton1Down:connect(function() if game:GetService("GamePassService"):PlayerHasPass(game.Players.LocalPlayer, 167686361) script.Parent.Parent.Frame.Visible = true else script.Parent.Parent.NoPass.Visible = true wait(5) script.Parent.Parent.NoPass.Visible = true end end)
Even though I have the gamepass, it skips down to the 'else'.
Got it working:
local player = script.Parent.Parent.Parent.Parent local noPass = script.Parent.Parent.NoPass local gui = script.Parent.Parent.Frame script.Parent.MouseButton1Down:connect(function() if game:GetService("GamePassService"):PlayerHasPass(player, 167686361) then gui.Visible = true else noPass.Visible = true wait(5) noPass.Visible = false end end)
script.Parent.MouseButton1Down:connect(function() if game:GetService("GamePassService"):PlayerHasPass(game.Players.LocalPlayer, 167686361) then -- You forgot to add "then" script.Parent.Parent.Frame.Visible = true else script.Parent.Parent.NoPass.Visible = true wait(5) script.Parent.Parent.NoPass.Visible = true end end)
You forgot the "then" after the if
condition. If you come across another issue, then we may need to take a harder look. This is just what I noticed at first glance.