Explosion cloning itself twice?
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
01 | if val 2 :find( "Detonation" ) then |
02 | local u 3 = require(game.ServerScriptService.Modules.HitDetection); |
03 | local v 16 = game.ServerStorage.Assets.CannonExplosion:Clone(); |
04 | v 16. CFrame = enemy.Torso.CFrame |
06 | v 16. Owner.Value = Player.Name |
07 | v 16. Parent = game.Workspace.Thrown; |
08 | v 16. Impact.fart.Enabled = true |
09 | v 16. Impact.nerd.Enabled = true |
10 | v 16. Impact.L.Enabled = true |
11 | v 16. Impact.ez.Enabled = true |
12 | v 16. Impact.trash.Enabled = true |
13 | v 16. Impact.doodoo.Enabled = true |
14 | v 16. Impact.jaja.Enabled = true |
15 | v 16. Impact.hi.Enabled = true |
18 | v 16. Impact.fart.Enabled = false |
19 | v 16. Impact.nerd.Enabled = false |
20 | v 16. Impact.L.Enabled = false |
21 | v 16. Impact.ez.Enabled = false |
22 | v 16. Impact.trash.Enabled = false |
23 | v 16. Impact.doodoo.Enabled = false |
24 | v 16. Impact.jaja.Enabled = false |
25 | v 16. Impact.hi.Enabled = false |
26 | if character.Name = = v 16. Owner.Value then |
27 | create( "IFRAME" , 1 ,character) |
29 | if info.damage and math.random( 1 , 1 )< = 1 +(info.damage* 0.2 ) and not character:FindFirstChild( "DetoCD" ) then |
30 | u 3. magnitudeCheck(character, v 16. Position, 30 , { |
38 | local v 17 = Instance.new( "Accessory" ) |
40 | v 17. Parent = character |
41 | game.Debris:AddItem(v 17 , 3 ) |
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?