So i have this modulescript that creates an attachment with particles but for someone it doesn’t get deleted
local GojoVFX = {
["ReversalRed"] = function(PathData)
local Character = PathData.Character
local Humanoid = Character:FindFirstChild("Humanoid")
local HRP = Character:FindFirstChild("HumanoidRootPart")
local Task = PathData.Task
local RedBall = Assets.ReversalRed.Part.RedBall:Clone()
local ReversalBeam = Assets.ReversalRed.Beam:Clone()
if Task == "Summon" then
RedBall.Parent = Character:FindFirstChild("Right Arm")
elseif Task == "Destroy" then
RedBall:Destroy()
elseif Task == "Fire" then
ReversalBeam:SetPrimaryPartCFrame(PathData.Direction * CFrame.Angles(0, 0, math.rad(math.random(-180,180))))
ReversalBeam.Parent = PathData.Character
for i, v in pairs(ReversalBeam:GetDescendants()) do
if v:IsA("BasePart") then
TweenService:Create(v, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),{
Transparency = 1,
Size = Vector3.new(v.Size.X, v.Size.Y * 1.5, v.Size.Z * 1.5)
}):Play()
elseif v:IsA("SurfaceLight") then
TweenService:Create(v, TweenInfo.new(0.25),{
Range = 0,
Brightness = 0
}):Play()
end
end
Debris:AddItem(ReversalBeam, .25)
end
end,
}
return GojoVFX
Idk if it’s related or not but doing “Character:FindFirstChild(“Right Arm”).RedBall:Destroy()” works, how?
Isn’t it like just the same as doing “RedBall:Destroy()”?
Its because “Character:FindFirstChild(“Right Arm”).RedBall:Destroy()” is finding the RedBall instance, rather than “RedBall:Destroy()” which is technically “local RedBall = Assets.ReversalRed.Part.RedBall:Clone():Destoy()” (incorrect code but its just so you understand)
Oh, sorry. If you want to delete the cloned part do
local RedBall = Assets.ReversalRed.Part.RedBall
local ReversalBeam = Assets.ReversalRed.Beam
local RedBallClone = RedBall:Clone()
local ReversalBeamClone = ReversalBeam:Clone()
And that lets you destroy both the clone and the original
Also realized i was a bit wrong.
local RedBall = Assets.ReversalRed.Part.RedBall:Clone() does not clone the part everytime you index it, but you just cant access the original part, so this infact should also work.