Adding Sunrays using a script (Server or Local)

I’m trying to make a map system, when a map loads in, stuff like colorcorrection, sunrays and stuff should load in with the map

local Cosmetics = Map:FindFirstChild("LightingCosmetics")
	
	if Cosmetics then
		for i,v in pairs(Cosmetics:GetChildren()) do
			local Thing = v:Clone()
			Thing.Name = "MinigameEssential"
			Thing.Parent = Lighting
			pcall(function()
				Thing.Enabled = true
			end)
		end
	end

The sunrays dont seem to load in, even when using a localscript.

ive also tried doing localscript stuff (parenting the rays to the camera) and it also doesnt work

Have you tried Instance.new instead of cloning…?

doesn’t work, it has the same effect as cloning

Perhaps try placing it inside of lighting properly…

You did Thing.Parent = Lighting, it should be

Thing.Parent = game.Lighting

nope, doesn’t work. still the same as usual…

Maybe its just the settings inside of your Sunrays… Maybe try turning them up, idrk how they work cause I rarely use them.

the sunrays are fine, i tested them in studio, and it shows normally

Are there any errors when you try it?

nope, the rays get cloned, and the instance goes in Lighting, it just doesn’t render

Check your graphics settings in studio and game.

1 Like

I am literally uhh, I didn’t know you needed to be max (or high) graphics to actually see the rays of sun.

Wait but didn’t they work before?

my graphics in studio is maxed compared to in-game