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

Keeps saying userid is not a valid member of player.miner561473? Located at serverscript service.

Asked by 3 years ago
local id = 18411129
local AnotherBrick = game.Workspace.winners
local door = game.Workspace.WinnersSpawner
local doorScript = game.Workspace.WinnersSpawner.GamepassTeleporter
local playersService = game:GetService("Players")
local MarketplaceService = game:GetService("MarketplaceService")
playersService.PlayerAdded:Connect(function(player)
    if MarketplaceService:UserOwnsGamePassAsync(player.userid, id) == true then
        print("Player has pass.")
    else
        print("Player does not have pass.")
    end
end)

2 answers

Log in to vote
1
Answered by 3 years ago

Make sure you're indexing UserId correctly (with capitalization).

Ad
Log in to vote
0
Answered by 3 years ago

can some one tell me how to sent a picture of ur script so people can help u ???

Answer this question