Hello, everyone! I was trying to script something when I discovered that it wasn't working. Is anyone able to assist me? I would appreciate every single help. I wanna check if they have a the gamepass, if they don't I check if they are in the for i,v list, if they are not, I want to kick them.
Here is my script:
local Premium = {0}
local MPS = game:GetService("MarketplaceService")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
game.Players.PlayerAdded:Connect(function(plr)
if MPS:UserOwnsGamePassAsync(plr.UserId,1031940432432423432402) then
print("User joined with Beta Access Gamepass!")
else
for i,v in pairs (Premium) do
if v == player.UserId then
print("Beta Access was given to this user manually.")
else
plr:Kick("You sadly do not have access to Beta Version.")
end
end
end
end)
end)
end)

4 comments
errors? if not, what prints
502: API Services rejected request with error. HTTP 403 (Forbidden) This is the only error, it may be another script however.
what prints. Also, you don’t need another PlayerAdded
'14:21:12.458 - Argument 1 missing or nil'