I've got the touching the brick part and pretty much everything else, however I don't know how to do the explosion part. This is what I have so far, not sure if any of this is how it's supposed to be done though.
01 | wall = game.Workspace.RocksideGlitchbombWall |
02 | bomb = game.Workspace.Glitchbomb |
03 | explosion 1 = Instance.new( "Explosion" ,bomb) |
04 |
05 | function OnTouched() |
06 | wait(. 5 ) |
07 | wall.CFrame = CFrame.new( 75.5 , 10.5 , 8 ) |
08 | wait( 1 ) |
09 | bomb.CFrame = CFrame.new( 86 , 20 , - 4 ) |
10 | wait( 1 ) |
11 | bomb.Anchored = false |
12 | wait( 3 ) |
13 | explosion 1. BlastRadius = 30 |
14 | bomb.Transparency = 1 |
15 | wait( 15 ) |
16 | bomb.CFrame = CFrame.new( 85 , - 40.874 , - 5 ) |
17 | wall.CFrame = CFrame.new( 75.5 , - 50.5 , 8 ) |
18 | end |
Disclaimer: I am only using answers because it won't allow me to comment don't down vote because I didn't give an correct answer
I am not a expert but I think at the bottom before the end you should have some type of connection to connect to the function, It should go like this:
1 | wall.CFrame = CFrame.new( 75.5 , - 50.5 , 8 ) |
2 |
3 | wall.Touched:connect(OnTouched) -- Because there is a bomb AND a wall Idk which one you would do sorry |
4 | end -- Some people do end) but I think right now end is just fine |
I also found another Function connect system:
01 | wall = game.Workspace.RocksideGlitchbombWall |
02 | bomb = game.Workspace.Glitchbomb |
03 | explosion 1 = Instance.new( "Explosion" ,bomb) |
04 |
05 | function OnTouched(bomb) -- Added the hit part |
06 | wait(. 5 ) |
07 | wall.CFrame = CFrame.new( 75.5 , 10.5 , 8 ) |
08 | wait( 1 ) |
09 | bomb.CFrame = CFrame.new( 86 , 20 , - 4 ) |
10 | wait( 1 ) |
11 | bomb.Anchored = false |
12 | wait( 3 ) |
13 | explosion 1. BlastRadius = 30 |
14 | bomb.Transparency = 1 |
15 | wait( 15 ) |
16 | bomb.CFrame = CFrame.new( 85 , - 40.874 , - 5 ) |
17 | wall.CFrame = CFrame.new( 75.5 , - 50.5 , 8 ) |
18 | bomb.Touched:connect(OnTouched) -- Connecting to the "function OnTouched(bomb)" |
19 | end |
So basically the first one was a connect(function - receiver method and second one was connectFirst(function - receiver which connects the function first before any other receiver, Idk if any of them works it is a suggestion, Like I said They won't let me use comments so I hope I helped