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: Why won't my script work?

Previous Thread :: Next Thread 
IndigoSpeaker is not online. IndigoSpeaker
Joined: 10 Jan 2012
Total Posts: 33
10 Mar 2014 12:20 PM
Here it is:

humanoid = game.Workspace.Pepper1Seedling1.Humanoid()
currentHealth = humanoid.Health
humanoid.HealthChanged:connect(function(health)

if Workspace.Pepper1Seedling1.humanoid.Health == 500 then
game.Workspace.Pepper1Seedling1:remove()
game.Lighting.Pepper1Seedling2:clone().parent = game.Workspace
end
end)

Basically I want it so that when the Pepper1Seedling1's health reaches 500, it removes itself then clones from lighting Pepper1Seedling2 (which is an upgrade from Pepper1Seedling1). So when it gets to 500, it levels up basically.

Please note the humanoid is actually not in Pepper1Seedling1 it is in a model in Pepper1Seedling1 (Workspace > Pepper1Seedling1 > Pepper - Seedling Tier 1 > Humanoid) as the script wont register spaces as a model...
Report Abuse
Looah is not online. Looah
Joined: 22 Feb 2013
Total Posts: 922
10 Mar 2014 12:21 PM
this pure code of inefficiency
Report Abuse
IndigoSpeaker is not online. IndigoSpeaker
Joined: 10 Jan 2012
Total Posts: 33
10 Mar 2014 12:22 PM
I am sorry, I am new to Lua. I just started learning today ._.
Report Abuse
IndigoSpeaker is not online. IndigoSpeaker
Joined: 10 Jan 2012
Total Posts: 33
10 Mar 2014 12:26 PM
I didn't mean to offend you... x_x
Report Abuse
IndigoSpeaker is not online. IndigoSpeaker
Joined: 10 Jan 2012
Total Posts: 33
10 Mar 2014 12:36 PM
Does anyone know? I kinda need it working.
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