Advertisement
Cakey3101

24 Hour Clock Tutorial

Apr 16th, 2025
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.35 KB | Source Code | 0 0
  1. local Lighting = game:GetService("Lighting")
  2. local RunService = game:GetService("RunService")
  3.  
  4. local Label = script.Parent
  5.  
  6. RunService.PostSimulation:Connect(function()
  7.     local CurrentTime = math.floor(Lighting.ClockTime)
  8.     local Minutes = math.floor((Lighting.ClockTime % 1) * 60)
  9.     Label.Text = string.format("Time: %02d:%02d", CurrentTime, Minutes)
  10. end)
Tags: lua
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement