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: Model Not taking damage?

Previous Thread :: Next Thread 
Cheeso135 is not online. Cheeso135
Joined: 13 Apr 2013
Total Posts: 2016
20 Jun 2014 04:55 PM
I need to get a model that was made by me, can deal damage, follow players, respawn, etc, take damage when hit with LinkedSword. I haven't figured out a script that will do this.
Report Abuse
Locard is not online. Locard
Joined: 13 Apr 2014
Total Posts: 3516
20 Jun 2014 05:04 PM
I suggest you read the locked forum thread on SH again.
Report Abuse
Cheeso135 is not online. Cheeso135
Joined: 13 Apr 2013
Total Posts: 2016
20 Jun 2014 05:14 PM
SH?
Report Abuse
ShinobiBlue is not online. ShinobiBlue
Joined: 01 Nov 2009
Total Posts: 4177
20 Jun 2014 05:17 PM
The thread at the top of this forum.
Report Abuse
Cheeso135 is not online. Cheeso135
Joined: 13 Apr 2013
Total Posts: 2016
20 Jun 2014 05:20 PM
Yeah lol. I found it. Not a problem with the script. I have the game breaking when there is an error with the script. The model just does not take damage. Is there a (take damage) script or something that I can insert?
Report Abuse
Cheeso135 is not online. Cheeso135
Joined: 13 Apr 2013
Total Posts: 2016
20 Jun 2014 05:31 PM
I just looked over all the scripts in the model….found nothing about damage to begin with but…..it is not like it has 1 billion health or has no humanoid function….I mean, I hit it with a sword and it loses no damage…..PLease someone help!!!!
Report Abuse
Cheeso135 is not online. Cheeso135
Joined: 13 Apr 2013
Total Posts: 2016
20 Jun 2014 05:41 PM
Should I use an OnTouch take damage script?
Report Abuse
Aisoc is not online. Aisoc
Joined: 08 Jun 2013
Total Posts: 412
20 Jun 2014 05:43 PM
well first you should understand to zombies work than look for linked sword my suggestion
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
20 Jun 2014 05:43 PM
The problem is likely with the sword. It is looking for a Humanoid with a specific name that isn't matching with what your model has.
Report Abuse
Cheeso135 is not online. Cheeso135
Joined: 13 Apr 2013
Total Posts: 2016
20 Jun 2014 05:46 PM
Hmmm. I just tried to use an OnTouch script but it did not work Here:

function onTouched(LinkedSword)
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
h.Health = h.Health -5
end
end

script.Parent.Touched:connect(onTouched)

It says that the last line is invalid because OnTouched is part of the model. I tried changing it to Torso (part of the model) but it did not work….
Report Abuse
Cheeso135 is not online. Cheeso135
Joined: 13 Apr 2013
Total Posts: 2016
20 Jun 2014 05:47 PM
I made the model not have a name. I just put a space and hit enter. Do I have to name it?
Report Abuse
Aisoc is not online. Aisoc
Joined: 08 Jun 2013
Total Posts: 412
20 Jun 2014 05:48 PM
i am not sure about this its true or not
h.Health = h.Health -5


try to add wait() to first line
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
20 Jun 2014 05:48 PM
The model, no. The Humanoid has to match whatever you used in the script, in this case "Humanoid".
Report Abuse
Cheeso135 is not online. Cheeso135
Joined: 13 Apr 2013
Total Posts: 2016
20 Jun 2014 05:56 PM
YESSSS THANK YOU KNIGHTMARE AND THANKS EVERYONE ELSE!!!
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