1 | function whenTouched(part) |
2 | if part.Name = "Name of the Ball" then |
3 | local x = script.Parent |
9 | script.Parent.Touched:connect(whenTouched) |
This script will allow the brick to change transparency when the ball (any other brick will not work) touches the surface of the brick. On the if part.Name = "Name of the Ball" line of code, change the text inside the speech marks to the name of the ball on the workspace or where ever it is located, if it is Ball then your code would be
1 | function whenTouched(part) |
2 | if part.Name = "Ball" then |
3 | local x = script.Parent |
9 | script.Parent.Touched:connect(whenTouched) |
Hope this works. Remember to insert this code in to a normal script, which should be inside the brick that you want to become transparent.
Closed as Not Constructive by Sublimus, Pyrondon, and M39a9am3R
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?