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: What is the best way for somthing to damage?

Previous Thread :: Next Thread 
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
19 Jul 2013 10:47 AM
Okay, I;ve been scripting my gun and Have It completed.
But When I use hum:TakeDamage(damage)
Their health bouces back 1/5 Of the time witch can be annoying...
But When I use]
hum.Health = hum.Health = damage
It doesent bouce back, but it can do damage in force Fields.

So Baiscly what I'm saying is there a way to get the best of both worlds?


~ Uh huh, life's like this Uh huh, uh huh, that's the way it is 'Cause life's like this Uh huh, uh huh that's the way it is Chill out, what you yellin' for? Lay back, it's all been done before And if you could only let it be You will see I like you the way you are When we're drivin' in your car And you're talking to me one on one But you've become Somebody else 'round everyone else You're watching your back like you can't relax You're tryin' to be cool You look like a fool to me Tell me Why do you have to go and make things so complicated? I see the way you're Acting like you're somebody else, gets me frustrated And life's like this you, You fall and you crawl and you break and you take what you get and you turn it into Honesty, you promised me I'm never gonna find you fake it No, no, no You come over unannounced Dressed up like you're somethin' else Where you are ain't where it's at you see, you're making me Laugh out when you strike your pose Take off all your preppy clothes You know, you're not fooling anyone When you've become Somebody else 'round everyone else You're watchin' your back like you can't relax You're tryin' to be cool You look like a fool to me Tell me Why do you have to go and make things so complicated? I see the way you're Acting like you're somebody else, gets me frustrated And life's like this you, You fall and you crawl and you break and you take what you get and you turn it into Honesty, you promised me, I'm never gonna find you fake it No, no, no No, no, no (No) No, no, no (No) No, no, no (No)(No) Chill out, what you yellin' for? Lay back, it's all been done before And if you could only let it be You will see Somebody else 'round everyone else You're watching your back like you can't relax You're trying to be cool, You look like a fool to me Tell me Why do you have to go and make things so complicated? I see the way you're Acting like you're somebody else, gets me frustrated And life's like this you, You fall and you crawl and you break and you take what you get and you turn it into Honesty, you promised me, I'm never gonna find you fake it No, no Why do you have to go and make things so complicated? (Yeah, yeah) I see the way you're Acting like you're somebody else, gets me frustrated And life's like this you, You fall and you crawl and you break and you take what you get and you turn it into Honesty, you promised me I'm never gonna find you fake it No, no, no~
Report Abuse
Mathfreak231 is not online. Mathfreak231
Joined: 21 Jun 2010
Total Posts: 5311
19 Jul 2013 10:52 AM
use your second method, but use an if statement to only do damage if a forcefield is not found (FindFirstChild)

~This sig is false~
Report Abuse
Christbru01 is not online. Christbru01
Joined: 03 Apr 2010
Total Posts: 649
19 Jul 2013 10:55 AM
Simply do a scan for forcefields in the character? Also the bounceback is a known roblox bug, which is more publicly reffered to as 'Health glitch', I'm hoping roblox reviews their code and fixes this error soon...
local ffed=false
for _,item in pairs(character:children()) do
if item:IsA("ForceField") then
ffed = true
end
end
if not ffed then
character:FindFirstChild("Humanoid").Health = character:FindFirstChild("Humanoid").Health - damage
end
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