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 » Building Helpers
Home Search
 

So I'm going to learn how to script *i have questions*

Previous Thread :: Next Thread 
Photonics is not online. Photonics
Joined: 14 Feb 2010
Total Posts: 26773
29 Nov 2013 08:48 PM
So i had a friend explain to me some of the things in scripting
First im going to try and analyze this lava brick
***NOTE: THE DASHES ARE MY QUESTIONS AS WELL***

function onTouched(part)-- Is part the name of the brick it is in?
local h = part.Parent:findFirstChild("Humanoid")-- Findfirstchild? Parent?
if h~=nil then -- My friend didnt explain the h~=nil then part
h.Health = h.Health -100
wait(.1)


end
end

script.Parent.Touched:connect(onTouched)

The rest of this I understand, just those places where i included my notes in I don't understand, if someone could explain also what "nil" and "~" is used for?
Report Abuse
Photonics is not online. Photonics
Joined: 14 Feb 2010
Total Posts: 26773
29 Nov 2013 08:48 PM
wrong forum, sorry
Report Abuse
NoctisLightning is not online. NoctisLightning
Joined: 13 Jun 2012
Total Posts: 383
29 Nov 2013 09:00 PM
I'm pretty sure nil means clear, but I am not 100% sure. I don't know a lot about scripting sorry. For better answers, try the Scripting Helpers Forum.
Report Abuse
Photonics is not online. Photonics
Joined: 14 Feb 2010
Total Posts: 26773
29 Nov 2013 09:01 PM
Yeah, i reposted this there, i accidentally clicked this forum though
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Building 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