Problem with Spawn/RespawnLocation and Teams

  • What are you attempting to achieve?
    I’m trying to make the character respawn on a certain SpawnLocation depending on the current team of the player.

  • What is the issue?
    I have two issues.
    First the SpawnLocations simply doesn’t work, the player just spawns on the middle of the world. I already set the properties of SpawnLocation, like Neutral to false, TeamColor to the color of the correct Team; the player’s RespawnLocation property is set to the SpawnLocation object of the team, also the Team property is set to the Team object.


cap2

I tried using an IF statement to compare the player’s team with the Team objects when a character is added to the player, then i change the character’s HumanoidRootPart CFrame to the position of the specific SpawnLocation. The problem is that it can’t check what team is the player in, it’s like if the player even hadn’t a team.

I asked in Hidden Developers forum, and they said that’s a correct way to check the player team and it should work nice.

The code: (RE)SpawnLocation issue. - Pastebin.com

I didn’t, should i?
By the way, thanks for the fast answer!

Each SpawnLocation has a TeamColor property down.

image


It barely works, it just made me spawn on the other SpawnLocation.
I’ll try your first solution-

There is a TeamColor property on the SpawnLocations. Set this BrickColor property to the BrickColor of the team and you’re fine.


image

I already did it,but it doesn’t work.

I spawn at the middle of the world.

That’s right, i changed the team from a LocalScript, i’ll try doing it from a server Script now.

1 Like

Already found a solution.
Thanks for your interest!

1 Like