faultydex
|
  |
| Joined: 18 Sep 2010 |
| Total Posts: 24608 |
|
|
| 13 Jun 2014 05:22 AM |
| I can't understand any other tutorial and I like reading text better. |
|
|
| Report Abuse |
|
|
oskar363
|
  |
| Joined: 26 Aug 2012 |
| Total Posts: 2836 |
|
|
| 13 Jun 2014 05:23 AM |
read.
I am the wizard of wizards |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2014 05:24 AM |
wiki.roblox.com
Find scripting help there. |
|
|
| Report Abuse |
|
|
jasondee1
|
  |
| Joined: 26 Jul 2008 |
| Total Posts: 8002 |
|
|
| 13 Jun 2014 05:33 AM |
simple beginners crash course-
script.Parent:Remove()
three assets in here that are the basic cores of scripting-
1. "script.Parent", or parents: Parents are, basically what something is inside of in the workspace, like if you had a script in a part, the part is the script's parent.
2. "script", or the "Child". Children are basically what are inside of other objects, what they are inside of being their "Parent" and them being the "Children" of that "parent"
3. Event and function calls, or ":Remove()", Event and Functions basically do stuff in the roblox enviroment, custom functions can be defined, but basically calling a function or event would be something like "part:Remove()", Obviously, the event ":Remove()" Removes something from the game instance. There are a lot more events in roblox and they are critical to script function |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2014 05:38 AM |
@jason
the :Remove() event is deprecated.
Fun fact: the :Remove() event doesn't actually permanently destroy the block; it only sets it's parent to nil. Meaning you can actually bring that block back.
If you're not planning on ever using that block again and you're positive about it then you should plan on using:
:Destroy() |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2014 05:40 AM |
Scripting is kind of like pitching a tent, it's sort of hard once you begin, but once you get the hang of it it's actually pretty easy.
You just go with the flow. |
|
|
| Report Abuse |
|
|
Selux
|
  |
| Joined: 26 Apr 2014 |
| Total Posts: 1385 |
|
| |
|
Selux
|
  |
| Joined: 26 Apr 2014 |
| Total Posts: 1385 |
|
| |
|
jasondee1
|
  |
| Joined: 26 Jul 2008 |
| Total Posts: 8002 |
|
|
| 13 Jun 2014 05:42 AM |
Whoopsie, I've been up all night.
I meant ":Destroy()" I tend to get things mixed around when I'm tired like this. But really, ":Remove()" would never have worked because the function wasn't defined (it was capitalised) |
|
|
| Report Abuse |
|
|
jasondee1
|
  |
| Joined: 26 Jul 2008 |
| Total Posts: 8002 |
|
|
| 13 Jun 2014 05:44 AM |
| But, everyone who asks me "How do I script?" I give em the good old crash course and give them links, and they turn out okay |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2014 05:45 AM |
Sort of think of scripting (Lua) as english, but in a more straight to the point way.
If you want a block to go invisible, assuming the block is in the workspace then you would use this command:
English version:
Find block in workspace and turn it invisible
Lua version:
Workspace.Block.Transparency = num
Let's break out down here,
we know the block is in the workspace so we're looking for a part called "block" in the workspace so we would use:
Workspace.Block
All parts and other sorts of stuff have properties in them
we are gonna use the transparency property which is basically how "visible" the block is.
So we are accessing the transparency property by using
Block.Transparency
now we want the transparency to be slightly invisible for starters.
The transparency value uses
0-1
0 being completely visible
1 being completely invisible to the human eye.
so let's make it partly invisible
Workspace.Block.Transparency=0.5
and there you go. |
|
|
| Report Abuse |
|
|
jasondee1
|
  |
| Joined: 26 Jul 2008 |
| Total Posts: 8002 |
|
|
| 13 Jun 2014 05:48 AM |
| Yeah,uh, I don't mean to correct, but this guy is going to get confused with properties and parents now. You never explained what properties were o-O. I always explain: Children, Parents, Events, Properties, Cframe, XYZ, etc before showing them something like Transparency so early |
|
|
| Report Abuse |
|
|
jasondee1
|
  |
| Joined: 26 Jul 2008 |
| Total Posts: 8002 |
|
|
| 13 Jun 2014 05:51 AM |
| I like to base my teaching off of how the student thinks, so we don't present a whole new idea before teaching them what it actually is, your teacher didn't expect you to read before you knew your alphabet did he/she? |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2014 05:51 AM |
Straight from the wiki
"A property is sort of like a member of a part/object"
http://wiki.roblox.com/index.php/Property |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2014 05:52 AM |
Well he never explained what he was trying to make. So I figured i'd start with something simple.
Like resetting your character or deleting a block.
|
|
|
| Report Abuse |
|
|
jasondee1
|
  |
| Joined: 26 Jul 2008 |
| Total Posts: 8002 |
|
|
| 13 Jun 2014 05:53 AM |
| But it isn't a "Member of a part/object" Its an interchangable enum PROPERTY. Sometimes the wiki can be derp |
|
|
| Report Abuse |
|
|