|
ok so i have made a script it is a bit like a minigame i have wrote the whole mainscript out i just need someone to edit it so when there is one player left the game ends can anyone help |
|
|
|
Alive = {}
while wait() do
if #Alive == 1 then
--Code Here
end
end |
|
|
im not that much of an advanced scripter thats y i am paying to have this feature added for me |
|
|
Use tables to record who is alive, and who is not.
For each death, remove a player from the table. The last player in the table wins. |
|
|
DralianJoin Date: 2013-03-21 Post Count: 7624 |
@Skit.
One, scripting requires grammar.
Two, read the wiki.
|
|
|
i can script basic wiki teaches stuff i already know |
|
|
is it using teams? playing and spectators? or w/e |
|
|
im gonna post the script and im gonna pay to have that feature added if someone will
Minigames = game.Lighting.Minigames:GetChildren()
h = Instance.new("Hint", game.Workspace)
while true do
if game.Players.NumPlayers > 1 then
h.Text = "Deciding what map to play :P"
Wait(3)
ranGame = math.random(1, #Minigames)
gameChosen = Minigames[ranGame]
h.Text = gameChosen.Name.. " Has Been Chosen"
gameChosenClone = gameChosen:Clone()
gameChosenClone.Parent = game.Workspace
wait(1)
for i = 10, 1, -1 do
h.Text = "Game Loading: " ..i
wait(1)
end
Wait(0.5)
Spawns = gameChosenClone.Spawns:GetChildren()
for i, v in pairs(game.Players:GetPlayers()) do
name = v.Name
check = game.Workspace:FindFirstChild(name)
if check then
checkHumanoid = check:FindFirstChild("Humanoid")
end
if checkHumanoid then
sword = game.Lighting.Sword:Clone()
sword.Parent = v.Backpack
v.Character:MoveTo(Spawns[i].Position)
end
end
for i = 3, 1, -1 do
h.Text = "Game begins in: " ..i
Wait(1)
end
for i = 30, 1, -1 do
h.Text = "Time Left: " ..i
Wait(1)
end
h.Text = "Game Ended"
Wait(3)
gameChosenClone:Destroy()
else
h.Text = "Need more than 1 player to start :/"
end
Wait(1)
end |
|
|
|
|
anyone ill pay just need that feauture added to the script |
|
|
so you were not using team |
|
|
|
paying anyone who can add to my script a feature that makes it so when there is only 1 more player alive the game ends
the script:
Minigames = game.Lighting.Minigames:GetChildren()
h = Instance.new("Hint", game.Workspace)
while true do
if game.Players.NumPlayers > 1 then
h.Text = "Deciding what map to play :P"
Wait(3)
ranGame = math.random(1, #Minigames)
gameChosen = Minigames[ranGame]
h.Text = gameChosen.Name.. " Has Been Chosen"
gameChosenClone = gameChosen:Clone()
gameChosenClone.Parent = game.Workspace
wait(1)
for i = 10, 1, -1 do
h.Text = "Game Loading: " ..i
wait(1)
end
Wait(0.5)
Spawns = gameChosenClone.Spawns:GetChildren()
for i, v in pairs(game.Players:GetPlayers()) do
name = v.Name
check = game.Workspace:FindFirstChild(name)
if check then
checkHumanoid = check:FindFirstChild("Humanoid")
end
if checkHumanoid then
sword = game.Lighting.Sword:Clone()
sword.Parent = v.Backpack
v.Character:MoveTo(Spawns[i].Position)
end
end
for i = 3, 1, -1 do
h.Text = "Game begins in: " ..i
Wait(1)
end
for i = 30, 1, -1 do
h.Text = "Time Left: " ..i
Wait(1)
end
h.Text = "Game Ended"
Wait(3)
gameChosenClone:Destroy()
else
h.Text = "Need more than 1 player to start :/"
end
Wait(1)
end |
|