I have a localscript in StarterGui with the following code.
local passId = 900915415
function authenticate(player)
return game:GetService("GamePassService"):PlayerHasPass(player, passId)
end
game.Players.PlayerAdded:Connect(function()
if authenticate(game.Players.LocalPlayer.Character.Name) then
game.Players.LocalPlayer.PlayerGui.PremiumShop.Enabled = true
game.Players.LocalPlayer.PlayerGui.Shop.Enabled = false
else
game.Players.LocalPlayer.PlayerGui.PremiumShop.Enabled = false
game.Players.LocalPlayer.PlayerGui.Shop.Enabled = true
end
end)
There are no output errors.
I want the script to enable the premium shop if the player has the gamepass, and the normal shop if the player doesn't have the gamepass upon joining. This script doesn't work in a FE game or non-FE game. Any feedback would be appreciated, thanks!

1 comment
Thanks! I used gui.Enabled instead because of screen guis.