Hi developers,
I’m making a game inspired by “Where’s the Baby!” And i need help on making a role chooser when the game starts.
I know that this has somewhat to do with events or bindable ones, otherwise we can pretty much… never do it. But i need help on choosing the parents and the babies (or kids). Anyone can help me?
(Yes i already have the round system:)
local CountdownEvent = game:GetService("ReplicatedStorage"):WaitForChild("Countdown")
local Status = game.ReplicatedStorage:WaitForChild("Status")
local Maps = game:GetService("ReplicatedStorage"):WaitForChild("Maps"):GetChildren()
function Time()
for i = 60, 1, -1 do
Status.Countdown.Value = i
task.wait(1)
end
end
function MainFunction()
local PlayersAmount = #game:GetService("Players"):GetPlayers()
--if PlayersAmount >= 1 then
local RandomMap = Maps[math.random(1, #Maps)]:Clone()
for i = 30, 1, -1 do
Status.Countdown.Value = "Next round starting in: "..i
task.wait(1)
end
Status.Countdown.Value = "Choosing map.."
task.wait(2)
Status.Countdown.Value = "Map Choosed! "..RandomMap.Name
task.wait(2)
RandomMap.Parent = workspace
for i, ServerPlayers in pairs(game.Players:GetPlayers()) do
ServerPlayers.Character.HumanoidRootPart.CFrame = RandomMap.Spawn.CFrame
end
Time()
RandomMap:Destroy()
for i, ServerPlayers in pairs(game.Players:GetPlayers()) do
ServerPlayers.Character.HumanoidRootPart.CFrame = workspace.SpawnLocation.CFrame
end
MainFunction()
--end
end
MainFunction()