game.ReplicatedStorage.EventForHMS.OnClientEvent:Connect(function(foundData)
local function toHMS(s)
return ("%02i:%02i:%02i"):format(s/60^2, s/60%60, s%60)
end
script.Parent.TextLabel.Text = toHMS(foundData)
end)
Their script:
game.ReplicatedStorage.EventForHMS.OnClientEvent:Connect(function(foundData)
local function convertToHMS(s)
local minutes = math.floor(s / 60)
local seconds = s % 60
local milliseconds = (seconds * 10) % 10
seconds = math.floor(seconds)
milliseconds = tostring(milliseconds)
milliseconds = tonumber(milliseconds)
return string.format("%02i:%02i.%01i", minutes, seconds, milliseconds)
end
script.Parent.TextLabel.Text = convertToHMS(foundData)
end)
For those who need it:
It finds the absolute value (positive, math.abs of -100 is 100) of the difference between the absolute of out foundData (a variable in the server script passed on into) and the absolute value of the time since the unix epoch (1970, UTC time 00:00:00 1st of janurary))
Yep! Ty for all your help! I just made a stupid mistake, forgot to link checking the time to the remote event (It only does it if it is your first time claiming XD)
works good!
off-topic -
also noticed you can execute code into a public server as developer (I don’t need admin commands when I can use game.Players.PlayerName:Kick("GET BetTer bOi")
That is why my av isn’t in the video, I used :Destroy() on it!