Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Spawn script not working?

Asked by 9 years ago

This script is located inside a spawn, within a map. The map is located inside ServerStorage. When a map loads the spawn team color is supposed to change to Cyan, and if the map not being used, it's supposed to change the team color to Really red. Now this is working perfectly, the team color changes when the map loads, however the character doesn't spawn on it, even if the character is on the Cyan team. It's not making any sense to have a Cyan team color spawn yet not spawning a Cyan team player. What am I doing wrong?

local Spawn = script.Parent
local spawnValue = game.Workspace.spawnValue

function spawnChange()
if spawnValue.Value == 5 then
Spawn.TeamColor = BrickColor.new("Cyan")
else 
Spawn.TeamColor = BrickColor.new("Really red")
end
end
2
The spawns Neutral value may be set to true? Or the players is? xImmortalChaos 565 — 9y

1 answer

Log in to vote
-1
Answered by 9 years ago

Well, how about you make them teleport to the spawns and touch them. The spawns will have ChangeTeamOnTouch set to true, so they change teams, then when the game ends, they teleport back to the spawns.

Ad

Answer this question