Here's what I have so far..
1 | function touch(hit) |
2 | hit:remove() |
3 |
4 | end |
5 |
6 | script.Parent.Touched:connect(touch) |
I think I can fix this. First thing first, add a click detector in the brick using properties. The script could look like this. The only thing I don't know how to do is make it stop growing. To make it stop growing you need to make the loop false somehow. I just don't know how to make it false. Hope it helps. :D
1 | function grow() |
2 | while true do |
3 | wait( 1 ) -- you can make it wait as long as you want, e.g wait(1.1) |
4 | game.Workspace.Part.Size = game.Workspace.Part.Size + ( 1 , 1 , 1 ) -- (length, height, width) |
5 | end |
6 | end |
7 | script.Parent.ClickDetector.MouseClick:connect(grow) |
Well...... I am new to scripting so I can't help you much. All I know is "touch" function is written like that function OnTouch(hit)
That's how would line 1 look like.
No..... Don't accept my answer, just upvote it if it helped! Thanks for reading!