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
 

Is it possible to make a block heal, and if so, how?

Previous Thread :: Next Thread 
Bloxxiness is not online. Bloxxiness
Joined: 25 Jun 2013
Total Posts: 17
30 Jul 2013 10:31 PM
Tonight is my first night of scripting. I'm really hope to make some scripts. Currently, I'm trying to make a script that if a player steps on a brick it heals him 25 health. This is the script I'm using currently using, which damages the player. (I do not know if I can basically reverse the script, so do not call me a "noob" please.)

function onTouched(hit)
local human = hit.Parent:findFirstChild("Humanoid")
if (human ~= nil ) then
human.Health= 75
end
end

script.Parent.Touched:connect(onTouched)

Is there any way I could make this scripts able to heal, or do I have to make a new script? Please help.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
30 Jul 2013 10:32 PM
human.Health = human.Health + 25
Report Abuse
eagletouch is not online. eagletouch
Joined: 05 Jun 2009
Total Posts: 4349
30 Jul 2013 10:32 PM
noob

/GPmOcBT | http://www.roblox.com/Forum/ShowPost.aspx?PostID=107601546
Report Abuse
Bloxxiness is not online. Bloxxiness
Joined: 25 Jun 2013
Total Posts: 17
30 Jul 2013 10:32 PM
Thank you, Cody. I am trying it right now.
Report Abuse
blackshockwave is not online. blackshockwave
Joined: 16 Mar 2012
Total Posts: 1381
30 Jul 2013 10:38 PM
First night and working on functions.No no no Wiki time or LuaLearners
Report Abuse
morash is not online. morash
Joined: 22 May 2010
Total Posts: 5834
30 Jul 2013 10:40 PM
1 month on roblox and already scripting. :0 It took me like a year to start.
Report Abuse
Bloxxiness is not online. Bloxxiness
Joined: 25 Jun 2013
Total Posts: 17
30 Jul 2013 10:41 PM
I tried using that on the script. It didn't work, when I replaced the damage with the healing. Am I doing it wrong?
Report Abuse
Bloxxiness is not online. Bloxxiness
Joined: 25 Jun 2013
Total Posts: 17
30 Jul 2013 10:42 PM
Oh, okay. I got distracted while replying and didn't the other replies.
Report Abuse
morash is not online. morash
Joined: 22 May 2010
Total Posts: 5834
30 Jul 2013 10:52 PM
function onTouched(hit)
local human = hit.Parent:findFirstChild("Humanoid")
if (human ~= nil ) then
human.Health = human.Health + 25
end
end
Report Abuse
Bloxxiness is not online. Bloxxiness
Joined: 25 Jun 2013
Total Posts: 17
30 Jul 2013 10:56 PM
I tried that, it didn't work. I'll just figure it out in the morning. Thanks for the help, though.
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