Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I make a brick appear by touching a different brick?

Asked by 4 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

This is like my last post, but I want to know how I can make a brick appear instead.

Example: We have two bricks, A and B.

When I touch A, B will appear.

If you need more information, please make a comment and I'll try to answer as soon as possible. Any help is appreciated.

0
Attempt anything and post the code. Azarth 3141 — 4y

1 answer

Log in to vote
0
Answered by
royaltoe 5144 Moderation Voter Community Moderator
4 years ago

change the brick 'B's transparency when brick A's touched event is called:

touchBrick = game.Workspace.A
appearingBrick= game.Workspace.B

touchBrick.Touched:Connect(function()
    appearingBrick.Transparency = 0
end)
0
I believe he wanted it to change when a player touches it rather than just any part theking48989987 2147 — 4y
1
y r u doing it for him and for the love of christ, stop teaching people to use global variables for everything. Azarth 3141 — 4y
0
I forgot completely about transparency. Thanks. oliwierpl11alt 20 — 4y
0
what should i have done instead? royaltoe 5144 — 4y
View all comments (2 more)
0
only used variables to make it easier to understand obv shouldn't use variables for every last thing royaltoe 5144 — 4y
0
This is a more simple way of doing what I wanted to do. I just added edited this a little and added cancollide and set it to true, I made B an invisible wall at first that has cancollide set at false, and when someone touches A the wall just appears. Exactly how I wanted this to end up. Thanks. oliwierpl11alt 20 — 4y
Ad

Answer this question