Lighting from a part

So basically I wanted to make a “core arking effect”, it’s basically an effect where storm like lighting goes from a part.
robloxapp-20220712-2336276.wmv (1.9 MB)
(game is B core if you are intrested)
See those lightings around the part? That’s what I want to achieve.

1 Like

Try and use beams. You can insert them with the explorer. You can put a texture on the beam and attach it to two parts with attachments.

Yeah I know, but I want it randomised.

Ok I found a solution. I made a script that most likely goes:

while wait(tonumber(script.Wait.Value)) do
	local shootPos = script.Parent.CFrame*CFrame.fromEulerAnglesXYZ(math.rad(math.random(-180,180)),math.rad(math.random(-180,180)),math.rad(math.random(-180,180)))
	for i = 1, 25 do
		local shootPart = Instance.new("Part", workspace)
		shootPart.Color = script.Color.Value
		shootPart.Anchored = true
		shootPart.CanCollide = false
		shootPart.Size = Vector3.new(0.5,5,0.5)
		shootPart.Transparency = 0.5
		shootPart.Material = Enum.Material.Neon
		local r1 = math.rad(math.random(-50,50))
		local r2 = math.rad(math.random(-50,50))
		local r3 = math.rad(math.random(-50,50))
		shootPart.CFrame = shootPos*CFrame.fromEulerAnglesXYZ(r1,r2,r3)*CFrame.new(0,2.5,0)
		shootPos = shootPart.CFrame*CFrame.new(0,2.5,0)*CFrame.fromEulerAnglesXYZ(-r1,-r2,-r3)
		game:GetService("Debris"):AddItem(shootPart,0.5)
		game:GetService("TweenService"):Create(shootPart,TweenInfo.new(0.5,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0,false,0),{Transparency = 1, Size = Vector3.new(0,5,0)}):Play()
	end
end