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

how do i make this script spawn where i want them?

Asked by 8 years ago

these are the scripts i have tried. it doesnt spawn on the first spawn. it spawns on the second spawn. i have 5 red spawns and 5 blue spawns

what im trying to do is make one person spawn on red, then second person on blue and third on red, and so on. please help!

01game.Players.PlayerAdded:connect(function(player)
02 
03 
04 
05    if game.Teams["Blue Team"].Number.Value <= game.Teams["Red Team"].Number.Value then
06    player.TeamColor = BrickColor.new ("Really red")
07 
08        if game.Workspace.Red.Red1.Used == false then
09            spawn()
10 
11 
12        end
13    end
14 
15    game.Teams["Red Team"].Number.Value = game.Teams["Red Team"].Number.Value  + 1
View all 35 lines...
01game.Players.PlayerAdded:connect(function(player)
02 
03 
04 
05    if game.Teams["Blue Team"].Number.Value <= game.Teams["Red Team"].Number.Value then
06    player.TeamColor = BrickColor.new ("Really red")
07    for i,v in pairs(game.Workspace.Red:GetChildren()) do
08        if v.Used == false then
09            spawn(v)
10 
11 
12        end
13    end
14 
15    game.Teams["Red Team"].Number.Value = game.Teams["Red Team"].Number.Value  + 1
View all 36 lines...

1 answer

Log in to vote
0
Answered by 8 years ago

Honestly, a script isn't needed for the player to spawn in a certain location. Insert a "Spawn Area" into workspace, place it where wanted, then change the properties up to where "TeamColor" is accurate to which is in the script.

Ad

Answer this question