Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- SERVER SCRIPT
- local map = game:GetService("ServerStorage"):WaitForChild("Map")
- local updateTimer = game:GetService("ReplicatedStorage"):WaitForChild("UpdateTimer")
- local canStart = false
- local endRace = true
- while true do
- for i = 10,1,-1 do
- updateTimer:FireAllClients(i)
- wait(1)
- end
- if canStart == true then
- map.Parent = game.Workspace
- for i = 30,1,-1 do
- updateTimer:FireAllClients(i)
- wait(1)
- if endRace == true then
- break
- end
- end
- map.Parent = game.ServerStorage
- end
- end
- -----------------------------------
- -----------------------------------
- -----------------------------------
- --- LOCAL SCRIPT
- local updateTimer = game:GetService("ReplicatedStorage"):WaitForChild("UpdateTimer")
- local timer = script.Parent:WaitForChild("Timer")
- updateTimer.OnClientEvent:Connect(function(currentTime)
- timer.Text = currentTime
- end)
Add Comment
Please, Sign In to add comment