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!