i have this ability that I've been working on, when used its used an explosion is cloned at the torso of the enemy you are targeting. The problem is, the explosion appears twice, only one of these explosions actually does damage, but 2 explosions coming out is unideal
if val2:find("Detonation") then
local u3 = require(game.ServerScriptService.Modules.HitDetection);
local v16 = game.ServerStorage.Assets.CannonExplosion:Clone();
v16.CFrame = enemy.Torso.CFrame
v16.Anchored = true
v16.Owner.Value = Player.Name
v16.Parent = game.Workspace.Thrown;
v16.Impact.fart.Enabled = true
v16.Impact.nerd.Enabled = true
v16.Impact.L.Enabled = true
v16.Impact.ez.Enabled = true
v16.Impact.trash.Enabled = true
v16.Impact.doodoo.Enabled = true
v16.Impact.jaja.Enabled = true
v16.Impact.hi.Enabled = true
v16.Explode:Play()
wait(0.1)
v16.Impact.fart.Enabled = false
v16.Impact.nerd.Enabled = false
v16.Impact.L.Enabled = false
v16.Impact.ez.Enabled = false
v16.Impact.trash.Enabled = false
v16.Impact.doodoo.Enabled = false
v16.Impact.jaja.Enabled = false
v16.Impact.hi.Enabled = false
if character.Name == v16.Owner.Value then
create("IFRAME",1,character)
end
if info.damage and math.random(1,1)<=1+(info.damage*0.2) and not character:FindFirstChild("DetoCD") then
u3.magnitudeCheck(character, v16.Position, 30, {
mana = true,
damage = 15,
nostun = true,
--ignoreragdoll = true,
--executes = true,
}, false, true);
-- game.Debris:AddItem(v16, 3)
local v17 = Instance.new("Accessory")
v17.Name = "DetoCD"
v17.Parent = character
game.Debris:AddItem(v17, 3)
end
end
I think the local v16 is causing a second one to come out, but when I remove the ":Clone()" the explosion comes out once and then gets taken out of storage forever, causing no more explosions to come out. Is there a way to make it not clone without taking the explosion out of serverstorage?

1 comment
I found the solution and fixed the problem, thanks for your help.