I made a script where touching those brown bricks you can see in the video causes your player to take damage. I also added a heal script that you can toggle. Somehow, my icon still take damage after its healed, despite not contacting the part anymore. What's even weirder is that I added print() in there, and the "print()" function in my damagebrick script does not fire. I'll attach the scripts if i can below this post
u/BURUCBURCGD
I am making killbricks for my game.
Normally, I have to manually add a script for each killbrick so the bricks actually kill the player on contact.
However, copypasting the same script over and over again to different parts gets boring too quickly.
Instead, I attempted to use Clone(): to clone a given script into every part named "killbrick".
There are several problems I've encountered while trying to find a way to clone these scripts into these parts such as:
- Not being able to add the script into the proper place as there are multiple parts named "killbrick"
- Every structure having a model in the workspace so I can't even path a way to the given parts, as each folder has multiple of these killbricks
- Not being able to add anything into these scripts
I need a script where the script scans all children in game.workspace, and adds a copy of a given killscript into parts named "killbrick" specifically. If you have a solution/suggestion to making a script like this, please respond
id also appreciate any tips on making something like this if its necessary