Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is my "GetMinutesAfterMidnight" script line not working?

Asked by 5 years ago
Edited by DeceptiveCaster 5 years ago

So, I am making a firework. It works however I want to set the time when it's igniting, but it keeps on "ignoring" the "GetMinutesAfterMidnight" script line. The whole script is as follows:

local ReplicatedStorage = game.ReplicatedStorage
local Dominus = ReplicatedStorage:WaitForChild('Dominus2')
local DropperPart = workspace:WaitForChild('DropperPart2')
local lighting = game.Lighting

--// Main

for i = 1,10,1 do
    if game.Lighting:GetMinutesAfterMidnight() > 17 * 60 then
    print(i)
    local NewDominus = Dominus:Clone(i)
    wait(0.1)
    NewDominus.Parent = DropperPart
    NewDominus.CFrame = DropperPart.CFrame
    game:GetService('Debris'):AddItem(NewDominus,(2)) -- The '3' is how many secs it will disappear in.
end
wait(5)

for i = 1,10,1 do
    print(i)
    local NewDominus = Dominus:Clone(i)
    wait(0.1)
    NewDominus.Parent = DropperPart
    NewDominus.CFrame = DropperPart.CFrame
    game:GetService('Debris'):AddItem(NewDominus,(2)) -- The '3' is how many secs it will disappear in.
end
end

Thank you for any answers and help!

0
just check the clock time, works aswell Gameplayer365247v2 1055 — 5y
0
I put the code in a code block. DeceptiveCaster 3761 — 5y

Answer this question