How would I send one rocket through out time

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? I want to make a script that launches fireworks through out time and once it reaches its active date it sends “peakrate”/s of fireworks and then it starts sending less through out declinetime

  2. What is the issue? Include screenshots / videos if possible!
    I don’t know what math to do to achieve this

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub? Yes but I didnt find anything

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!


local activedate = 1720117975
local peakrate = 5
local declinetime = 700

local colors = {
	Color3.fromRGB(19, 81, 255),
	Color3.fromRGB(255, 54, 43),
	Color3.fromRGB(75, 255, 77),
	Color3.fromRGB(254, 255, 32),
	Color3.fromRGB(255, 45, 252)
}

function launchFirework()
	local effect = game.ReplicatedStorage.Drives.Spread:Clone()
	game.ReplicatedStorage.Diff_WooshSfx:Clone().Parent = effect.Woosh

	local col = colors[math.random(1, #colors)]
	effect.Attachment['1'].Color = ColorSequence.new(col)

	local range = 50
	local posX = math.random(-range, range)
	local posZ = math.random(-range, range)
	effect.Position = Vector3.new(posX, 50, posZ)

	effect.Parent = workspace.Fireworks
	effect.Boom:Play()
	effect.Attachment.PointLight.Enabled = true
	effect.Attachment:FindFirstChild('1').Enabled = true
	wait(0.1)
	effect.Attachment.PointLight.Enabled = false
	wait(0.3)
	effect.Attachment:FindFirstChild('1').Enabled = false
end

while wait() do
	
	local currentTime = os.time()
	
end

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.