#Is there a way to round number using Time()

15 messages · Page 1 of 1 (latest)

warm geode
#

Title explains what im asking

glossy karma
#

os.time?

warm geode
#
local tool = script.Parent

local player = game.Players.LocalPlayer

local cdtimer = tool.Name 

local UIS = game:GetService("UserInputService")


local debug = true

tool.Equipped:Connect(function()
    UIS.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            if debug == true then 
                debug = false
                while true do 
                    wait(0.5)
                    time()
                    tool.Name = time()
                    debug = false
                    if time() > 30 then
                        debug = true
                        
                        break
                    end
            end
            while debug == false do
                    wait(0.5)
                    print("ON CD")
            end
        end
    end
end)
end)
#

This the script

glossy karma
#

well i've never heard of time before but os.time is rounded

warm geode
#

alright then I'll use that

#

Should be virtually the same

#

ok so it didnt work

#

rip

fast lynx
#

You wouldn't round a number user a timestamp

#

You can round the timestamp, if that's what you're asking

#

@warm geode

warm geode
#

Yeah thats what I'm asking

#

but honestly this script dosen't work anyways. As I think time() shows how much time has elasped since the server started/input was used. So I couldn't do something like a 30 second timer