Advertisement
saturnsolar

Timer LocalScript Server Edition | ROBLOX Studio

Apr 27th, 2020
14,504
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | None | 0 0
  1. local rep = game:GetService("ReplicatedStorage")
  2. local minutes = rep:WaitForChild("Minutes")
  3. local seconds = rep:WaitForChild("Seconds")
  4. local text = script.Parent
  5.  
  6. if seconds.Value <= 9 then
  7.     text.Text = tostring(minutes.Value)..":0"..tostring(seconds.Value)
  8. else
  9.     text.Text = tostring(minutes.Value)..":"..tostring(seconds.Value)
  10. end
  11.  
  12. minutes:GetPropertyChangedSignal("Value"):Connect(function()
  13.     if seconds.Value <= 9 then
  14.     text.Text = tostring(minutes.Value)..":0"..tostring(seconds.Value)
  15. else
  16.     text.Text = tostring(minutes.Value)..":"..tostring(seconds.Value)
  17. end
  18. end)
  19.  
  20. seconds:GetPropertyChangedSignal("Value"):Connect(function()
  21.     if seconds.Value <= 9 then
  22.     text.Text = tostring(minutes.Value)..":0"..tostring(seconds.Value)
  23. else
  24.     text.Text = tostring(minutes.Value)..":"..tostring(seconds.Value)
  25. end
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement