I tried to make it so ppl get teamed into a teamed after touching a part (not a spawn)
--put all the teams in a table .a table is a variable containing other variables
teamBricks = {
game.Workspace.RedPart
game.Workspace.OrangePart,
game.Workspace.BluePart
}
--when the player touches a team part, make the players team the team brick they stepped on.
function touchedPart(hit, teamPart)
local player = game.Players:FindFirstChild(hit.Parent.Name)
local team = game.Teams:FindFirstChild(teamPart.Name
if(player and team)then
player.Team = team
end
end
--make a touch event for each brick
for i = 1, #teamBricks do
teamBricks[i].Touched:Connect(function() touchedPart (TeamBricks[i]) end)
end
i got it from somebody but its not working please help ~Lowmeister

2 comments
Uh while you could use a script why not use roblox's built-in function in a "SpawnLocation" part?
Bc i only want to team the players into a team i dont want them to spawn there