I keep getting "Game passes can only be queried by a Script running on a ROBLOX game server"
here is the script:
local button = script.Parent
local player = game.Players.LocalPlayer
local id = 516571966
button.MouseButton1Down:connect(function()
if game:GetService("GamePassService"):PlayerHasPass(player, id) then
if button.Parent.ColorFrame == false then
button.Parent.ColorFrame.Visible = true
end
end
end)

5 comments
I've answered a similar question on gamepasses. https://scriptinghelpers.org/questions/35978/how-do-i-set-someone-onto-a-team-when-the-join-if-they-own-my-gamepass#38460
Doesn't help. This is a gui.
Do you have FE on?
FE?
Filtering enabled. GUIs can not be edited from the server and game passes can only be used on the server, so you have to use a remote event or a remote function to communicate between the server and client.