I want all the devs to be on the devs team and the players on the players team but it doesn't seem to be working.
plr = game.Players.LocalPlayer repeat wait()until game.Players.LocalPlayer.ChildAdded if plr.Name == "Gamerasassin514" or plr.Name == "DailyMadlymarthan" or plr.Name == "UwaisPlayz" then plr.Team = game.Teams.Devs plr.TeamColor = BrickColor.new("Royal purple") end if plr.Name ~= "Gamerasassin514" or plr.Name ~= "DailyMadlymarthan" or plr.Name ~= "UwaisPlayz" then plr.Team = game.Teams.Players plr.TeamColor = BrickColor.new("Bright red") end
FE prevents changes made by code in LocalScripts from replicating to the server automatically (with exceptions).
--Put this in a normal Script under ServerScriptService or Workspace. PlayerService = game:GetService('Players') CurrentPlayers = PlayerService:GetPlayers() TeamService = game:GetService('Teams') DevTeam = TeamService:WaitForChild('Devs') PlayerTeam = TeamService:WaitForChild('Players') ---------------------------- --Names of the Players you want on the Devs team go inside this table DevNames = { 'Gamerasassin514', 'DailyMadlymarthan', 'UwaisPlayz' } ---------------------------- function NameCheck(Player) local Name = Player.Name for i = 1, #DevNames do if DevNames[i] == Name then Player.Team = DevTeam break else Player.Team = PlayerTeam end end end PlayerService.PlayerAdded:Connect(NameCheck) for i = 1,#CurrentPlayers do NameCheck(CurrentPlayers[i]) end
Make sure the teams "Devs" and "Players" have already been created, and their AutoAssignable
property is disabled.
If there's anything you don't understand, ask, and I'll do my best to answer.