Quick note I have pretty much zero scripting knowledge, so I might not understand some responses. I have been making a game where you basically are on 1 of 4 teams, and fight to control a small town. Anyways, there are lots of houses, and I want to be able to make the glass break. Would it be possible to make any part that is the material Glass break (disappear) when it is shot, and then regenerate after a certain time? Or would I have to put the script in each part individually? The reason I am wondering this is because there are a lot of windows, and it would take forever. If it changes anything the game uses the ACS gun system.
Yes, that would be fairly easy to make by scouring through every descendant in workspace and checking if it has the material of glass (or just using CollectionService).
the thing is I dont want the player to click the glass I want them to shoot it with the gun. if you are saying that the click detector would work while using the tool I have already tried and it doesnt.
If your script uses raycast, aka an invisible laser/laser bullet, you can use the result where the raycast intersects to change the transparency and CanCollide property. If it uses physical bullets, you can have the bullet’s touch event return whatever part it touches, and you can change the transparency and CanCollide property from there. In the same function, you can have the part wait for some seconds before changing the transparency property to visible and CanCollide. I do highly recommend getting at least the foundational knowledge of script to truly understand what most of us may give for the answer.