I have two spawns. When someone joins the game there on the "Loading game" team. When they fall off of the spawner for the "Loading Game" there will be the "Visitor" spawn underneath it. But if someone dies in the Visitor spawn I do not want them near the Loading game spawn I want them on the grass. How can I make two of the same spawns but only spawn at one of the two spawns?
COMMUNITY QUESTION
How do i make two of the same team spawns but only spawn at one of the two spawns?
2 answers
Well, instead of using two spawns, just use one. Underneath the loading spawn, instead of a SpawnLocation, put in a script that changes the player's team when they touch it.
Things that will be relevant to you include Part.Touched, Players:GetPlayerFromCharacter, and Player.TeamColor.
So somehting like this? @iconmaster
tm = script.Parent
function onTouched(hit)
local h = hit.Parent:FindFirstChild("Humanoid")
if h ~= nil then
local n = hit.Parent
local p = game.Players:FindFirstChild(""..n.Name.."")
if p ~= nil then
p.TeamColor = tm.BrickColor
end
end
end
script.Parent.Touched:connect(onTouched)
1 comment
0
Look into GetPlayerFromCharacter() instead of FindFIrstChild.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Read below
Thank you it worked!