-
**What do you want to achieve?**I want to make a round system
-
What is the issue? The timer doesnt working causing the rest of the script not to work
-
What solutions have you tried so far? Youtube
[Server Scipt]
for i = 20, 0, -1 do
game.StarterGui.ScreenGui.Text = i
game.Workspace.TimeReady.Value = true
if game.StarterGui.ScreenGui.Text == "0" then
game.ReplicatedStorage.VoteStation:Clone().Parent = workspace
game.Workspace.TimeReady.Value = false
-- game.Players.LocalPlayer.Character:MoveTo(Vector3.new(-37.569, 0.5, -21.906)) -- = Vector3.new( -37.569, 0.5, -21.906)
game.Workspace.VoteStation.pad1.Touched:Connect(function()
game.Workspace.VoteStation.pad1.Pad.Value += 1
end)
game.Workspace.VoteStation.pad2.Touched:Connect(function()
game.Workspace.VoteStation.pad2.Pad.Value += 1
end)
game.Workspace.VoteStation.pad3.Touched:Connect(function()
game.Workspace.VoteStation.pad3.Pad.Value += 1
end)
wait(10)
local v = game.Workspace.VoteStation.pad1.Pad.Value
local y= game.Workspace.VoteStation.pad2.Pad.Value
local w = game.Workspace.VoteStation.pad3.Pad.Value
wait(1)
local result = math.max(v,y,w)
game.Workspace.Cool.Value = result
wait(3)
if v == result then
game.ReplicatedStorage.Chapter1:Clone().Parent = workspace
game.StarterGui.ScreenGui.Text = "Chapter one selected"
end
if y == result then
game.ReplicatedStorage.Chapter2:Clone().Parent = workspace
game.StarterGui.ScreenGui.Text = "Chapter two selected"
end
if w == result then
game.ReplicatedStorage.Chapter3:Clone().Parent = workspace
game.StarterGui.ScreenGui.Text = "Chapter three selected"
end
end
wait(1)
end