I made a script that checks if a player has a gamepass that gives him access to a special feature in game, but when I do it returns "Game passes can only be queried by a Script running on a ROBLOX game server" even thought it's inside a script in the Server Script Storage, can anybody help?
if game:GetService("GamePassService"):PlayerHasPass(player, 921094225) then
player.PlayerGui.Unlock:FireClient()
end

5 comments
It'd be nice if you could paste the error
That was the error. "18:40:45.941 - Game passes can only be queried by a Script running on a ROBLOX game server (x3)"
Is this in a localscript? This can only be run from the serverside, not the client
No, it's a regular script inside Server Script Storage.
Soo there is no solution? xD