How would you make light from a firework in the sky hit the ground

read the title, but also i guess you have to raycast every 60 studs in a circle and make an attachment with a light in it

I could be wrong because lights might have a max range or something but when it explodes just put a light where it was in a part or in it and tween the light’s range and brightness really fast outward

thats my problem, the max range

As far as I’m aware after testing you would have to find some wacky work around like you said which might not look that good, the max range is 60 I guess so what you’re saying can’t be done, usually with fireworks in games people just use particles and parts that move around in the air and such, Roblox won’t support huge lights like 2000 studs wide I guess for performance reasons.

I could try making something where it gets all parts in a radius and then gets the right surface, makes a part the same size as the part it found, put it in front of the part it found, then put a surfacelight in it

my suggestion is to do it animal crossing style and change the color of the ambient in the lighting service to the color of the fire work

check it out
https://www.roblox.com/games/8069512877/Firework-test

well thats a good idea, but that would change the light in the whole map

1 Like

You could tween it in and out for players within the range of the firework, like have a module to tween the camera and just make a function that tweens the lighting and brightness in and out as the firework explodes for players within a magnitude of the firework, you can do this like so.

local players = game:GetService("Players") -- gets the players service and the children of players is the players themselves as you can see in the explorer

local remote = game:GetService("ReplicatedStorage").FireworkRemote

local firework = workspace.Firework--reference the firework wherever it is in the workspace or script

for _, player in ipairs(players:GetChildren()) do -- loop through all the players since npcs don't need screen effects
	local char = player.Character --define each players character
	local magnitude = (char.HumanoidRootPart.Position - firework.Position).Magnitude--check the distance between each Vector3 of the characters humanoidrootpart and firework
	if magnitude <= desiredDistance then--check if the distance is less than the desired distance or equal too it to make sure they are in range
		remote:FireClient(player, "FireworkEffects")--fire the firework remote to the client and pick it up on the client to then do the camera lighting and brightness effects maybe even tween FOV a little.
	end
end