-
What do you want to achieve I want to make it so whenever the round starts it grabs all the players and when the round ends it checks who died I think? Im not asking for someone to write a whole script, just point me in the right direction.
-
What is the issue? I dont know how to make it so whenever the round starts it gets all the playesr and then displays who lost after the round ends.
-
What solutions have you tried so far? Yes, everywhere for the past week almost.
The script (for reference)
local lobbyLocation = game.Workspace.Lobby2.Position + Vector3.new(0,3,0)
local gameLocation = game.Workspace.Game.Position + Vector3.new(0,3,0)
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local timeEvent = ReplicatedStorage:WaitForChild('TimeEvent')
local tweenService = game:GetService("TweenService")
local Lava = game.Workspace.Other.Lava
local tweeninfo = TweenInfo.new(20,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0)
local tweeninfo2 = TweenInfo.new(1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0)
local move2 = {
Position = Vector3.new(0, 24.994, -5.795)
}
local move = {
Position = Vector3.new(0, -43.124, -5.795)
}
local tween = tweenService:Create(Lava,tweeninfo2,move)
local tween2 = tweenService:Create(Lava,tweeninfo,move2)
local function playGame()
tween2:Play()
print("Game Started!")
local timeAmount = 20
local timerText = 'Game Time: '
while timeAmount > 0 do
timeEvent:FireAllClients(timeAmount, timerText)
wait(1)
timeAmount -= 1
end
end
local function beforeGame()
print("Game is Starting!")
local beforeGame = 10
local beforeText = 'Lava Starts In: '
while beforeGame > 0 do
timeEvent:FireAllClients(beforeGame, beforeText)
wait(1)
beforeGame -= 1
end
end
local function playIntermission()
tween:Play()
print("Intermission has started!")
local intermission = 3
local timerText = ' '
while intermission > 0 do
timeEvent:FireAllClients(intermission, timerText)
wait(1)
intermission -= 1
end
end
local function resetPlayers()
print("Players have been reset!")
for _, plr in pairs(game.Players:GetChildren()) do
plr.Character.HumanoidRootPart.CFrame = CFrame.new(lobbyLocation)
end
end
local function teleportPlayers()
print("Players were teleported!")
for _, plr in pairs(game.Players:GetChildren()) do
plr.Character.HumanoidRootPart.CFrame = CFrame.new(gameLocation)
end
end
while true do
resetPlayers()
playIntermission()
teleportPlayers()
beforeGame()
playGame()
end
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.