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

How do I put a player's name in a table and remove it when that player dies?

Asked by 7 years ago
Edited by M39a9am3R 7 years ago

Here's my code (I'm kinda new to this site so I might do it wrong.): `` if game.Players.NumPlayers == 1 then

for i = 1, 1, -1 do
    textLabel.Text = "Intermission:  "..i
    wait(1)
end

textLabel.Text = "Intermission:  0"

wait(1)

textLabel.Text = "I see you're looking at this text ;)"

wait()

textLabel.Text = " "

wait(1)

textLabel.Text = "pls w8 we make map ;,,("

wait(1)

target = CFrame.new(-1, 339.5, 3) 
        for i, player in ipairs(game.Players:GetChildren()) do
            if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
        player.Character.HumanoidRootPart.CFrame = target + Vector3.new(0, i * 5, 0)
    end
end
wait()
textLabel.Text = "ok go now"        
    --else
--textLabel.Text = "Not enough players.Need at least 2 people."

end

0
Warning, do not use vulgar or inappropriate language on the website. M39a9am3R 3210 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

I don't see the table, but if you wanted to put player names on a table then you can create a string value and then you can do local Table = script.Parent:WaitForChild("StringValue").Value. Then you can freely change the value by using script.Parent:WaitForChild("StringValue").Value = "Name1,Name2,Name3" so on. I'm not sure if you can change a script from another script. But this method works.

Ad

Answer this question