I want to make a script in which when a player joins my game, they'll immediately be put onto a team no one else can join unless they also own the gamepass. This is a script I tried when combining the gamepass detection and team color codes but it hasn't worked. Any ideas? Many thanks!
1|local passId = 512383233 -- change this to your game pass ID. 2| 3|function isAuthenticated(player) -- checks to see if the player owns your pass 4| return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId) 5|end 6| 7|game.Players.PlayerAdded:connect(function(plr) 8| if isAuthenticated(plr) then 9| game.Players["player"].TeamColor = BrickColor.new("Eggplant") 10| end

2 comments
Not really advanced but kinda.