Tracking
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 1852 |
|
|
| 23 Oct 2012 01:20 PM |
Okay I am following the wiki to make a script that removes my player's head. So far I have got to:
game.Workspace.Tracking.Head:Destroy()
Anyone know how I will understand more? |
|
|
| Report Abuse |
|
|
| |
|
Tracking
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 1852 |
|
| |
|
|
| 23 Oct 2012 01:42 PM |
And i'm out.
I refuse to help people who are ignorant and won't admit to there mistakes.
|
|
|
| Report Abuse |
|
|
Tracking
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 1852 |
|
|
| 23 Oct 2012 02:17 PM |
| I didn't say I didn't make a mistake. I need help ASAP. |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2012 02:25 PM |
Lua is based on hierarch, a series of parents and children, and by extra/interpolation ancestry and descendants.
'game' is the beginning of all of this hierarchy, from there, you choose a service. Workspace, Lighting, StarterGui, StarterPack, Debris, Teams, and much more.
Inside a service like the Workspace are items in the game as you see them, including your character.
game.Workspace.tracking -> this leads the script to your character.
game.Workspace.tracking.Head -> this finds your head
game.Workspace.tracking.Head:Destroy() -> this uses a method, which in this case is remove/destroy (Destroy is most recommended, as removed is depreciated)
The Destroy method there deletes your head, which kills your character due to a Humanoid needing a Head and Torso to survive.
Hope that helps |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 23 Oct 2012 02:45 PM |
"Lua is based on hierarch"
Not really, RBX.Lua is.
|
|
|
| Report Abuse |
|
|
|
| 23 Oct 2012 02:57 PM |
game.Workspace.Tracking.Head:Destroy()
says:
In the game find the Workspace, find something called Tracking. In Tracking find an object called Head:
Call a built-in Roblox function which deletes that Head from the game.
GL, Brian
|
|
|
| Report Abuse |
|
|
Tracking
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 1852 |
|
|
| 23 Oct 2012 03:05 PM |
| Okay guys thanks for the help. But, the script doesn't seem to work. |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 23 Oct 2012 03:07 PM |
Try this.
repeat wait() until game.Players:FindFirstChild("tracking") and game.Players.tracking.Character game.Workspace.Tracking.Head:Destroy()
|
|
|
| Report Abuse |
|
|
Tracking
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 1852 |
|
|
| 23 Oct 2012 03:09 PM |
| So what will happen if I enter the game? Will I get spawnkilled? |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 23 Oct 2012 03:11 PM |
| Pretty much, the interpreter waits until it finds a person called tracking and when it does it waits for its character to load so it can remove its head. |
|
|
| Report Abuse |
|
|
Tracking
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 1852 |
|
|
| 23 Oct 2012 03:12 PM |
| I entered the game. It must be because you put "tracking" instead of Tracking. |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 23 Oct 2012 03:13 PM |
| Yeah, it is. I thought it was lowercase, sorry :3 |
|
|
| Report Abuse |
|
|
Tracking
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 1852 |
|
|
| 23 Oct 2012 03:15 PM |
| Its okay. Also it only removes my head once. Is there a way to repeat it forever? |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 23 Oct 2012 03:18 PM |
It is supposed to. If you want a forever one here you go.
repeat wait() until game.Players:FindFirstChild("Tracking") and game.Players.Tracking.Character while true do pcall(function() game.Workspace.Tracking.Head:Destroy() end) wait() end
Try that |
|
|
| Report Abuse |
|
|
Tracking
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 1852 |
|
|
| 23 Oct 2012 03:19 PM |
| Okay. I read the bit of the wiki that said True and do but couldn't under stand them. |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 23 Oct 2012 03:20 PM |
...
You just posted this... So it seems that you're just rushing through the article. Take your time dude. |
|
|
| Report Abuse |
|
|
Tracking
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 1852 |
|
|
| 23 Oct 2012 03:22 PM |
| The script works. Well I originally joined 2009 so I have use free models for a while. And I may try a dance floor. Wish me luck. |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 23 Oct 2012 03:23 PM |
Good luck! If you need help I'll always be there ;)
Send me a message if you wish! |
|
|
| Report Abuse |
|
|
Tracking
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 1852 |
|
|
| 23 Oct 2012 03:29 PM |
| I pretty much tried at this. I think I messed up. |
|
|
| Report Abuse |
|
|
Tracking
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 1852 |
|
|
| 23 Oct 2012 03:29 PM |
This is the script.
game.Workspace.FindFirstChild("Brick1") while true do color.gradient.1.wait(1) color.gradient.2.wait(1) end) wait() end |
|
|
| Report Abuse |
|
|