but every spawner will need to be the same name as the team like
if a team is called Green then the spawner name should be Green
what i mean by spawner is any block it doesnot have to be a spawnlocation
but test first if the player get spawned in the right location when using the script
if you donot want to add the spawns in a folder then you can use tags and then use CollectionService to get them instead
yes maybe i made it to spawn the player on the block that its name is the same name as the player name you can have multiple spawns but add other spawns in a folder inside them
smt like this
Spawns
–Green
-1
-2
-3
–Blue
-1
-2
-3
etc
local Players = game:GetService("Players")
local SpawnsFolder = workspace.Spawns
Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local TeamFolder :Folder = SpawnsFolder[plr.Team.Name]
char:PivotTo(TeamFolder[math.random(1, #TeamFolder:GetChildren())].CFrame)
end)
end)
i tested it and it spawns a player on a random spawn from his teams spawns
Alright, they are all enabled and spawning does work; however my issue remains the same with them spawning on top of the RegionalArea part; which is the one with cancollide off.