Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Spawn script not working?

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

1 comment

2

The spawns Neutral value may be set to true? Or the players is?

1 answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.