punyman9
|
  |
| Joined: 09 May 2009 |
| Total Posts: 1158 |
|
|
| 24 Jul 2012 09:07 PM |
My friend taught me a few scripts about 8 months ago, and I haven't actually scripted anything in about 5 months.
This is everything I know so far. Some of these might be off, read above. This is basically everything my friend taught me.
print (words go here)
game.Players.UserName123.Head:remove() Is this right? I have a feeling I messed up in the beginning.
game.Workspace.Username123.Humanoid:Health=0 I KNOW I messed this up. It's all I remembered.
If you could tell me how to fix these crappy kill-scripts, I'd really appreciate it. I would also like it if anyone could throw a few tips in? That'd be great.
Thanks for the help.
-Puny |
|
|
| Report Abuse |
|
|
punyman9
|
  |
| Joined: 09 May 2009 |
| Total Posts: 1158 |
|
|
| 24 Jul 2012 09:09 PM |
I've looked on the wiki for scripting tutorials, but it's not really helping me.
I also know variables
abc=123 etc.
-Puny |
|
|
| Report Abuse |
|
|
ToonU
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 6303 |
|
|
| 24 Jul 2012 09:10 PM |
| [url]http://wiki.roblox.com/index.php/Scripting[/url] |
|
|
| Report Abuse |
|
|
ToonU
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 6303 |
|
|
| 24 Jul 2012 09:11 PM |
| Oh, you posted at same time as me sorry.. |
|
|
| Report Abuse |
|
|
punyman9
|
  |
| Joined: 09 May 2009 |
| Total Posts: 1158 |
|
| |
|
|
| 24 Jul 2012 09:14 PM |
You have some errors...
print (words go here)
*print("words go here")
game.Players.UserName123.Head:remove()
*game.Workspace.UserName123.Head:Remove()
game.Workspace.Username123.Humanoid:Health=0
*game.Workspace.Username123.Humanoid.Health=0 |
|
|
| Report Abuse |
|
|
punyman9
|
  |
| Joined: 09 May 2009 |
| Total Posts: 1158 |
|
|
| 24 Jul 2012 09:19 PM |
game.Workspace.Username123.Head:Destroy() --This works, correct?
-Puny |
|
|
| Report Abuse |
|
|
Strieken
|
  |
| Joined: 17 Jun 2011 |
| Total Posts: 3058 |
|
|
| 24 Jul 2012 09:20 PM |
I'll fix your mistakes, and add comments on what you did wrong, so that you can learn.
print("words go here") -- If it's not a variable, or another object, then you need to quote what you want to print.
game.Workspace.UserName123.Head:Destroy() -- A player's character items are not located directly under the player (well, that's not entirely correct. You might be able to access them via Player.Character[Object], but I haven't tried). Also, :Remove() was deprecated a couple months ago, and :Destroy() was put in place of it.
game.Workspace.Username123.Humanoid.Health = 0 -- It's good practice to type 'game.Workspace', but it's not entirely necessary (you can just say Workspace). It's also not necessary, but you should put spaces between an equals sign, and whatever is before/after it.
|
|
|
| Report Abuse |
|
|
punyman9
|
  |
| Joined: 09 May 2009 |
| Total Posts: 1158 |
|
|
| 24 Jul 2012 09:22 PM |
I also know math/alegebra in scripting.
I'm trying to learn about changing the transparency of a brick when stepped on.
-Puny |
|
|
| Report Abuse |
|
|
Strieken
|
  |
| Joined: 17 Jun 2011 |
| Total Posts: 3058 |
|
|
| 24 Jul 2012 09:25 PM |
script.Parent.Touched:connect(function(hit) script.Parent.Transparency = 000 -- Number here end)
That'll change the transparency to whatever you want once you touch it. |
|
|
| Report Abuse |
|
|