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

how do i make invisible brick that if you touch become visible?

Asked by
zed_103 23
5 years ago

how do i make invisible brick but if you touch it will become visible for certain time?

1
you need to give us a script if you want us to help you DraconianSG 58 — 5y
0
im (NOOB) at scripting so i dont have script to give you please help me zed_103 23 — 5y
0
Speedy...the right thing to do would be to set zed off in the right direction (like chessmate did) instead of posting a unhelpful comment. ForeverBrown 356 — 5y

2 answers

Log in to vote
2
Answered by
BuDeep 214 Moderation Voter
5 years ago

Well let's start off by making the brick. In order to do this you're going to want to go into studio, and navigate to the "Parts" window. This will be under the "Model" Tab. Once you have created your part, you're going to want to make sure its invisible.

To do this is quite simple. Simply open your properties window (which can be accessed through View-Properties) and then select your part that you want to turn invisible. Now that you've selected your Part you'll see a bunch of stuff pop up inside the Properties window. All's you need to focus on for the time being is the stuff inside of the "Appearance" tab.

Looking closer under this tab, you'll see a item called "Transparency" with a value to the right of "0". How transparency works is quite simple, in that a value of 0 is the least transparent value possible (100% visible) while a value of 1 is the most transparent value possible (0% visible). For your situation your going to want to set this value to 1.

Great! Now that you've just created an invisible part, you're going to want to make the script that can make the brick visible again. This gets a little bit more complicated and requires some RBLX LUA coding knowledge. I will link some more information on this below, but for now I will help you out with the script.

You're going to want to insert a new script inside of the invisible part, which can be done by going to the top navigation bar-model-then on the far right there will be a blue script icon. Click on this to create your script (make sure it's inside of your part!).

Now the script editor will open, with the text "Hello World". Delete this and enter this instead:

script.Parent.Touched:connect(function() --This function detects when the part is touched
    script.Parent.Transparency = 0 --This sets the transparency to being 100% visible
end)

There you have it! To read more into how all this works check out these helpful wiki articles:

https://developer.roblox.com/en-us/learn-roblox/studio-basics

https://developer.roblox.com/en-us/api-reference/event/BasePart/Touched

https://arebeexlua.fandom.com/wiki/Touched_Event

https://developer.roblox.com/en-us/articles/Building-a-City-with-Parts

0
Respec, you did it :) ForeverBrown 356 — 5y
Ad

Answer this question