How to make artificial sunrays from parts?

I’m working on a project and was wondering how I would be able to make a “sunray” effect from parts, similar to the one in Starscape. More specifically, I’m trying to make a physical star with these characteristics. It’s clearly possible, I just don’t know how to achieve this.

I’ve tried searching the web and forums but couldn’t find anything related.

Starscape star:

I’m also not sure whether to put this topic in the art section or keep it here.


If you are talking about the fast-moving rays of light moving backwards, that can be done with a beam and a texture.

If you are talking about exactly this glow

then that’s just camera trickery.

It was done by changing the lighting suns geographical latitude and clock time dynamically to make it look like its moving, to sell this effect a part was placed between the camera position and the suns position with the distance slowly increased and decreased to give a sense of depth.

If you want to do this you will need to fiddle around with the values a whole lot to make it look convincing, but if you want to give it a shot, here you go.

Here’s an example of what it looks like in-game

The code used is here

-- localscript
	game.Workspace.FakeSun.Position = game.Workspace.CurrentCamera.CFrame.Position + game:GetService("Lighting"):GetSunDirection() * 30

-- 30 is the distance in studs the fake sun object is offset from the camera.
-- this is the value you should change to make your sun go closer or further away

( Lighting:GetSunDirection )

You can only have this effect “on” a single part at once, and the lighting has to have a SunRaysEffect instance in it, you can add by right clicking the lighting, pressing insert object, and inserting SunRaysEffect.

I hope this helped and is what you were looking for, good luck with whatever it is you are making.