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.

1 comment
Yes, thats where I've been testing.