How can I create a spawn for teams?

Well, what I’m trying to do is a team spawn, I mean, I put myself in a team and automatically appear in the spawn where I put it, but it doesn’t work.

team

I thought it was like that

but I was wrong. Well that is what I try to do to put myself in a team but not in a selector team that is not if not that I put myself in a team and automatically with a reset or refresh it appears there

1 Like

Maybe try something like this:

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)

-- :GetPropertyChangedSignal will fire an event when the property in it's parameters is changed
-- Team is a property of the player that tells us what team the player is on

player:GetPropertyChangedSignal("Team"):Connect(function()
if player.Character then
-- Player's character exists so we can teleport them
local hrp = player.Character.HumanoidRootPart
hrp.CFrame = player.Team.SpawnLocation.Position
end
end)

end)
2 Likes

Hey!

If I’m catching what you’re saying there is a simple way to do this.

First, let’s put your spawn in workspace section -
image

Now, go ahead and select on the spawn in workspace -
image

Let’s open up properties! Go to view > properties -

Now since you have the spawn selected, the properties menu up, you should see something that says teamcolor -

Go ahead and change that to your teams color whatever you have it set as - example
image

Oh, and also, make sure to have neutral unchecked so people not on that team don’t spawn there -
image
image

Hope this helped!

5 Likes