Since the past day I've been trying to use the code for my gui it basiclly makes the gui visible when someone has the gamepass but it is not working I did everything correctly and it still not working heres my code Hope you guys find a solution to my problem~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~local id = 103728213 player = game.Players.LocalPlayer
game.Players.PlayerAdded:connect(function(player) if Game:GetService("GamePassService"):PlayerHasPass(player, id) then print(player.Name .. " has the game pass!") else print(player.Name .. " doesn't have the game pass...") end end)
Game show be "game" and you have to make the gui visible by linking your script to the Frame or TextLabel and such then you have to make the Visible to false in the properties then make it true when the script runs it like this game.StarterGui.GamePassGui.Frame.Visible = true
You have not actually told the game to copy the gui to the gamepass owner's gui. Sorry if I place random colons anywhere, I'm used to C# too much. Here is a snippet of code that may help:
local GUI = (location of gui) guiclone = GUI:clone(); guiclone.Parent = game.Players.LocalPlayer.PlayerGui
We then will place your if statement and then place the snippet of code in and boom!
local id = 103728213 player = game.Players.LocalPlayer game.Players.PlayerAdded:connect(function(player) if Game:GetService("GamePassService"):PlayerHasPass(player, id) then local GUI = (location of gui) guiclone = GUI:clone(); guiclone.Parent = game.Players.LocalPlayer.PlayerGui print(player.Name .. " has the game pass!") else print(player.Name .. " doesn't have the game pass...") end end)