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
 

hmm can someone help me fix this?

Previous Thread :: Next Thread 
soniclover01 is not online. soniclover01
Joined: 04 Jun 2010
Total Posts: 232
14 Sep 2010 07:32 PM
this is supposed to be a script that slowly regens health when you touch it

function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if h.Health < 100
h.Health+0
wait (1)
h.Health+10
repeat
until h.Health = 100
end
end
script.Parent.Touched:connect(onTouched)
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
14 Sep 2010 07:34 PM
replace the stuff between the local h line and the last end with this script:

if h ~= nil then
if h.Health < 100 then
repeat wait(1) h.Health = h.Health + 1 until h.Health == 100
end
end

then have the other end after that, and have the local h = whatever line before it so

local h = whatever
--my script
end
Report Abuse
soniclover01 is not online. soniclover01
Joined: 04 Jun 2010
Total Posts: 232
14 Sep 2010 07:37 PM
umm could you just show me the whole thing? cause i can't figure out your directions...
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