Wednesday, October 19, 2011

Scripting: Transparent Brick


Welcome, this will be the first ever tutorial that will be posted on this website. First I want to mention this, These tutorials will be informative. For the first few I will not provide pictures, since I am still working on the layout of the website. Once I get that done I will edit the posts and add pictures. Lets get started!



Requirements:

  • Roblox Studio
  • Time and patience


We will first need to open up roblox studio, once in there we will create a new place.

Next we want to insert a brick, and into the brick we will insert a Normal Script. This will be where we start making the transparent brick.

Define The Problem:

We want to create a brick that will turn transparent, then 1 second later become solid.


To do this, we first need to know the limits to the Transparency property.

Min Limit: 0
Max Limit: 1
Increments by: .1

Now that we know what the limits are, and how we can turn it transparent. We can start scripting our brick. We will need this simple code(Will be explained):

script.Parent.Transparency = 1
wait(1)
script.Parent.Transparency = 0

Explanation:

script.Parent.Transparency = 1  -- This line sets the scripts parents transparency to 1
wait(1) -- This makes the script wait(sleep) for 1 second


script.Parent.Transparency = 0  -- This line sets the scripts parents transparency to 0


That is all that is to it, I realize that the script is self explanatory but I wanted to make it clear.




Thanks for reading this tutorial, I hope you enjoyed it and are looking forward to reading another one.

No comments:

Post a Comment

Please post only appropriate comments.

Google Chrome Is The Preferred Browser To View This Website