1 | script.Parent.MouseButton 1 Down:connect( function () |
2 | if game:GetService( "GamePassService" ):PlayerHasPass(game.Players.LocalPlayer, 167686361 ) |
3 | script.Parent.Parent.Frame.Visible = true |
4 | else |
5 | script.Parent.Parent.NoPass.Visible = true |
6 | wait( 5 ) |
7 | script.Parent.Parent.NoPass.Visible = true |
8 | end |
9 | end ) |
Even though I have the gamepass, it skips down to the 'else'.
Got it working:
01 | local player = script.Parent.Parent.Parent.Parent |
02 | local noPass = script.Parent.Parent.NoPass |
03 | local gui = script.Parent.Parent.Frame |
04 |
05 | script.Parent.MouseButton 1 Down:connect( function () |
06 | if game:GetService( "GamePassService" ):PlayerHasPass(player, 167686361 ) then |
07 | gui.Visible = true |
08 | else |
09 | noPass.Visible = true |
10 | wait( 5 ) |
11 | noPass.Visible = false |
12 | end |
13 | end ) |
1 | script.Parent.MouseButton 1 Down:connect( function () |
2 | if game:GetService( "GamePassService" ):PlayerHasPass(game.Players.LocalPlayer, 167686361 ) then -- You forgot to add "then" |
3 | script.Parent.Parent.Frame.Visible = true |
4 | else |
5 | script.Parent.Parent.NoPass.Visible = true |
6 | wait( 5 ) |
7 | script.Parent.Parent.NoPass.Visible = true |
8 | end |
9 | 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.