Hello There!
As the title says, I’ve created a raycast which is used to replicate that fancy rock ring effect (Or impact crater, I guess) althought it only raycast at the center point at the game rather than the players position.
function Raycast(HRP)
local RayParams = RaycastParams.new()
RayParams.FilterDescendantsInstances = {workspace.Debris}
RayParams.FilterType = Enum.RaycastFilterType.Exclude
local Angle = 0
for i=1, 30 do
local Size = math.random(2,3)
local Part = Instance.new("Part")
Part.Anchored = true
Part.CanCollide = false
Part.Size = Vector3.new(1,1,1)
Part.CastShadow = false
Part.CFrame = Part.CFrame * CFrame.fromEulerAnglesXYZ(0, math.rad(Angle), 0) * CFrame.new(10,5,0)
game.Debris:AddItem(Part,5)
local Raycast = workspace:Raycast(Part.CFrame.Position,Part.CFrame.UpVector * - 10, RayParams)
if Raycast then
Part.Position = Raycast.Position + Vector3.new(0, -5, 0)
Part.Material = Raycast.Material
Part.Size = Vector3.new(Size, Size, Size)
Part.Color = Raycast.Instance.Color
Part.Orientation = Vector3.new(math.random(-180,180), math.random(-180,180), math.random(-180,180))
Part.Parent = workspace.Debris
local Tween = game.TweenService:Create(Part,TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0),{Position = Part.Position + Vector3.new(0, 5, 0)}):Play()
delay(4,function()
local Tween = game.TweenService:Create(Part,TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0),{Position = Part.Position + Vector3.new(0, -5, 0)}):Play()
end)
end
Angle += 25
end
end