I have this script to check if the player owns a gamepass and it works in studio but not in the actaul game, why ?
id = 1008824264
wait(10)
for i,v in pairs(game.Players:GetPlayers()) do
if v then
if game:GetService("GamePassService"):PlayerHasPass(v,id) then
wait(1)
game.Players.LocalPlayer.leaderstats.Points.Value = game.Players.LocalPlayer.leaderstats.Points.Value + 250
game.Players.LocalPlayer.PlayerGui.MEGAVIPWALK.Enabled = true
end
end
end

2 comments
Why do you need to do "if v then"?
you cant use localplayer in a serverscript...