How could I recreate this effect?

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

  1. What do you want to achieve? I am trying to recreate the rings that appear around the explosion shown in this video: Light laser beam thing - YouTube
    image

  2. What is the issue? I have no idea how to recreate this

  3. What solutions have you tried so far? I have using tweens in the following block of code which ended in disaster
    image

local t = 1
					local groundPos = (projectile.Position-((distance/4)*projectile.CFrame.UpVector))
					ring.CFrame = (CFrame.lookAt(groundPos, projectile.Position, Vector3.yAxis))
					ring.Parent = game.Workspace
					tweenService:Create(ring.Mesh, TweenInfo.new((t/2), Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {Scale = (ring.Mesh.Scale*Vector3.new((distance/2),(distance/2),distance/2))}):Play()
					tweenService:Create(ring, TweenInfo.new(t, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {Position = (projectile.Position+((distance/4)*projectile.CFrame.UpVector))}):Play() 
					task.delay((t/2), function()
						tweenService:Create(ring.Mesh, TweenInfo.new((t/2), Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {Scale = (ring.Mesh.Scale*Vector3.new(0,(distance/2),0))}):Play()
					end)
					debris:Additem(ring, t)

Here is the mesh ID I am using for the ring if you are wondering

rbxassetid://8188257545
Scale: 0.143, 0.143, 0.075

The projectile variable is the sphere part and ‘distance’ is a number equal to double the radius of the sphere.

 task.delay(t, function()
  ring.Parent = nil
 end)

Please help
Also, sorry if this is in the wrong place, I couldn’t find anywhere else to put it.

Oh, I forgot to add the ring to debris. Thank you for reminding me

Ok I’ve determined what I need to do

image
you see point B and point A?
they move when the shockwave moves upwards
point A is supposed to represent the position of the surface when point B is pointing towards it
point B is the edge of the shockwaves hitbox, meaning it can only move up and down
point B and A have to be on the same y level to make a straight line (because shockwave points straight up)
i need to get the length of red (which is a line segment from point A and B)
without raycasts

can someone help please?

Maybe try (PointA-PointB).Magnitude?

basic math, for those interested on how to find the chord length it would be 2 * radius * math.cos(math.arcsin(height / radius))
I made a desmos graph to demonstrate this

1 Like