Os.time not working

Hello there,
I have this script here that is using os.time but its not working, I got no errors or anything.
What I hope to achieve: to change a value when os.time reaches a certain time
Script:

        local RanbowOffsale = 1623458700
            local currentTime = os.time()

            if currentTime >= RanbowOffsale and trail.Name == "Rainbow" then trail.CanBuy.Value = false end       

You have to keep checking every second or so.

while os.time() <= RanbowOffsale and trail.Name == 'Rainbow' do
    trail.CanBuy.Value = true
    wait(1)
end
2 Likes

Oh, thank you, ill test it out