generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: I'm sort of new to scripting. Any help, please?

Previous Thread :: Next Thread 
punyman9 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. punyman9
Joined: 09 May 2009
Total Posts: 1158
24 Jul 2012 09:11 PM
It's ok :D

-Puny
Report Abuse
Monkey1234567890123 is not online. Monkey1234567890123
Joined: 24 Oct 2009
Total Posts: 327
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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image