Hello I this script I made doesnt work. If someone could make this script for me or help me would be thankful! I try making a script that if a specific player / players join a specific Team called "Staff" gets created and the specific player / players automaticly get assigned to that team.
local Owner = game.Teams.Owner game.Players.PlayerAdded:Connect(function(player) if player.Name == "Leonw_Bobo" or "www" then local RedTeam = Instance.new("Team"); RedTeam.Name = "Staff" RedTeam.Parent = game.Teams; RedTeam.TeamColor = BrickColor.Red(); player.Team = Owner end end)
Do you see, if player.Name == "Leonw_Bobo" or "www" then
I'm not sure what www means but, if www is a name then you have to add player.Name to www aswell.
But I think the rest is okay.
Here is your fixed script:
local Owner = game.Teams.Owner local RedTeam = Instance.new("Team") RedTeam.Name = "Staff" RedTeam.Parent = game.Teams RedTeam.TeamColor = BrickColor.new("Really Red") game.Players.PlayerAdded:Connect(function(player) local player1 = game.Players:FindFirstChild("Leon_Bobo") local player2 = game.Players:FindFirstChild("www") if player1 ~= nil then player1.Team = game.Teams.Staff end if player2 ~= nil then player2.Team = game.Teams.Staff end)
Hope it works!