local BallButton = script.Parent local player = game.Players.LocalPlayer BallButton:findFirstChild("Reg").MouseButton1Click:connect(function() game.Workspace.ValueFile.BallType.Value = 0 end) BallButton:findFirstChild("Blue").MouseButton1Click:connect(function() if game:GetService("GamePassService"):PlayerHasPass(player, 159205131) then game.Workspace.ValueFile.BallType.Value = 1 end end) BallButton:findFirstChild("Red").MouseButton1Click:connect(function() if game:GetService("GamePassService"):PlayerHasPass(player, 159602182) then game.Workspace.ValueFile.BallType.Value = 2 end end)
Why does it print (Game passes can only be queried by a Script running on a ROBLOX game server) in a game server
I cannot figure out this error.
The gamepass and the script might be working fine. Unfortunately, you can't test GamePasses in Roblox Studio. You have to actually be playing the game for the service to start.
This is not an answer;
This script was tested in game with roblox play and it gave a response like it usually only would on studio... I am part of Yellow's Dev team so I was clearing some things up.... I hope this helps people answer this problem.
The output is strange because it should only print this in studio test but it is doing this in a real server with real accounts... Please help!
What's the gamepass meant for?