Recently I have wondered, is there a way to only let players who are in a whitelist in and if they are not check if they have the gamepass, is this possible or not? I saw it in the newest Firestone V3 Update. If you know please reply if you can, that would be great. Thanks
local player = Players.LocalPlayer
local hasPass = false
local success, message = pcall(function()
hasPass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamePassID)
end)
if not success then
warn("Error while checking if player has pass: " .. tostring(message))
return
end
if hasPass then
-- Player already owns the game pass; tell them somehow
else
player:Kick(message: Get the gamepass)
end
Nope, people in the team create still have to pay for the game, regardless if they have edit access or play access.
Well, of course its possible. But the real question is: should you do it? I don’t think you should do it because it’s a great way to earn downvotes on your game since players will join and immediately get kicked.
The only way to get around this is to set it to paid access and give the devs/playtesters the Robux to buy paid access for that game.
local player = Players.LocalPlayer
local gamePassID = 1 --Put your GamepassId instead of 1
local hasPass = false
local success, message = pcall(function()
hasPass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamePassID)
end)
if not success then
warn("Error while checking if player has pass: " .. tostring(message))
return
end
if hasPass then
-- Player already owns the game pass; tell them somehow
print("Player owns Pass!")
else
player:Kick("Get the gamepass!")
end
Set the 1 to your GamePassId
After you defined gamePassID, go and update and check in game by using an print to see if worked and to see it use /console.
And you have tried to use Techniques of Javscript and Python.