Okay, so I was building a place that involves staff members and normal players for an interview center. The group doesn't have anybody ranked yet so I'm not doing that kind of script where a certain rank gets the Staff team. I can't really script, so it would be very helpful if someone would do that.
Put the certain player name in that team (It's called "Staff"). Spawn the player on that spawn platform associated with the team.
Thank you for replying or answering my question,
fox9191
game.Players.PlayerAdded:connect(function(p) -- When a player join if p.Name == "AdminName" then -- Check player's name p.TeamColor = BrickColor.new("Really red") -- Change team end end)
This is meant for one person, if you wanna do multiple you'll have to make a table and a for loop. Ask me if you want that.
This will make sure that all of your staff will be one the team:
game.Players.PlayersAdded:connect(function(playerJoin) if playerJoin.Name == "the staff member's name" then playerJoin.TeamColor = BrickColor.new("color of the staff team") playerJoin.Team = "Staff" elseif playerJoin.Name == "another staff member's name" then playerJoin.TeamColor = BrickColor.new("color of the staff team") playerJoin.Team = "Staff" end end)
However, the only way that this will work is to do the elseif part many times if you have more than 2 staff members.
function onPlayerEntered(plr) if plr.UserId == 125436495 then
plr.TeamColor = BrickColor.new("Teal") plr:LoadCharacter() end end
game.Players.PlayerAdded:connect(onPlayerEntered)
This is the new version since roblox has updated. It uses a user id to tell which person to give the team to and sadly only for a single person i dont know how to make it for multiple