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

Why does GameTag only gets assigned to one of the characters? (Player1 instead of player2 only)

Asked by 4 years ago

I have a script here that has a game tag that is only parented to one character in a test server of 2 characters. Here is it:

01local plrs = {}
02 
03    for i, player in pairs(game.Players:GetPlayers()) do
04        if player then
05            table.insert(plrs,player)
06        end
07 
08        status.Value = "Preparing..."
09        wait(3)
10 
11        local rand = math.random(1, #maps)
12 
13        local map = maps[rand]:Clone()
14        map.Parent = workspace
15 
View all 38 lines...

Answer this question