I am trying to make an exploding bomb and it wont work the bomb wont explode it just drops
script
01 | local Handle = script.Parent.Handle |
02 |
03 | local Explosion = script.Parent.Explosion |
04 |
05 | local Character = script.Parent.Parent.Parent.Character |
06 |
07 | local Active = 1 |
08 |
09 | function onClick() |
10 | if Active = = 1 then |
11 | local Bomb = Handle:Clone() |
12 | local Script = Explosion:Clone() |
13 | Bomb.Name = "Bomb" |
14 | Bomb.CanCollide = true |
15 | script.Parent = Bomb |
01 | wait( 5 ) |
02 |
03 | local Explosion = Instance.new( "Explosion" ) |
04 |
05 | local Blast = Instance.new( "Sound" ) |
06 |
07 | Blast.SoundId = "rbxasset://sounds\\Rocketshot.wav" |
08 |
09 | Blast.Parent = Bomb |
10 |
11 | Blast.Volume = 1 |
12 |
13 | Blast:Play() |
14 |
15 | Explosion.Parent = Bomb |
For your Character variable, use Character = game.Players.LocalPlayer instead.