Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Error in my gamepass script that says "game passes can only be queried... ' why ?

Asked by 6 years ago

As I said in the question whenever I join my game in an online server it says that in the dev console for some reason. My script works in studio but not in an actual server why ? This is what it says "game passes can only be queried by a script running on a roblox game sever" Here is my script

id = 1008824264
wait(10)
for i,v in pairs(game.Players:GetPlayers()) do
    if game:GetService("GamePassService"):PlayerHasPass(v,id) then
        wait(1)
        v.leaderstats.Points.Value=v.leaderstats.Points.Value + 250
        v.PlayerGui.MEGAVIPWALK.Enabled = true   
    end
end

0
It is because game passes can only be queried by a script running game server. hiimgoodpack 2009 — 6y
0
so only a server script and not a local script ? 1Messi3903 -5 — 6y
0
see I restated the error message and now you understood lol hiimgoodpack 2009 — 6y
0
... ^ arent you gonna answer the question and get rep like usual? greatneil80 2647 — 6y

Answer this question