Hello, I am trying to find a script where it makes a spawn for the team i want it to have.
I am aware you can do this other ways, but this script will be RAN by an admin in-game. This is because I’ll create the team (using adions admin in-game) but when I team myself and respawn, it teleports me off the map. If you don’t get what I mean, let me know.
In that case, you would want to create a new instance of a SpawnLocation, and change the TeamColor property to match with the same team colour that you want the SpawnLocation to be linked with. You would also want the Neutral property to be false, as this would allow only players within the same team to spawn on it.
Here is an example of how to do it:
local Teams = game:GetService("Teams")
-- This is how you would create a team
local startTeam = Instance.new("Team")
startTeam.Name = "Start"
startTeam.AutoAssignable = true
startTeam.TeamColor = BrickColor.new("White")
startTeam.Parent = Teams
-- SpawnLocation
local startSpawn = Instance.new("SpawnLocation")
startSpawn.Anchored = true
startSpawn.Size = Vector3.new(5, 1, 5)
startSpawn.AllowTeamChangeOnTouch = false
startSpawn.Neutral = false --// This is important!
-- This would be the colour of the team that you want the SpawnLocation to be linked with
startSpawn.TeamColor = startTeam.TeamColor
startSpawn.BrickColor = startTeam.TeamColor
startSpawn.Parent = game.Workspace
Hello, sorry to bother you on this random day considering I made this post a little while ago, however, I want the script to be where if the user says “createspawn [team name]” then it makes the spawn and the spawn colour is corresponded with it.
For example, if aiwaysbadly ran createspawn White Team then it would make a square (uncollidable) and would make the spawn White.