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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: How do ya change what a gun damages?(Zombie,Humanoid Etc.)

Previous Thread :: Next Thread 
thesuperdakotadude is not online. thesuperdakotadude
Joined: 18 May 2011
Total Posts: 2369
24 Dec 2011 10:10 PM
How?
Report Abuse
TheNewScripter is not online. TheNewScripter
Joined: 02 Mar 2010
Total Posts: 2432
24 Dec 2011 10:13 PM
Well, you could just make a universal damage function...

    GetHumanoid = function(Model)
        for _, Data in pairs(Model:GetChildren()) do
            if Data:IsA("Humanoid") then
                return Data
            end
        end
        
        return nil
    end

And just work based off of that....
Report Abuse
thesuperdakotadude is not online. thesuperdakotadude
Joined: 18 May 2011
Total Posts: 2369
25 Dec 2011 01:15 AM
........
Could someone translate that o.o i do not know what the heck that means..
Report Abuse
TwoBoo is not online. TwoBoo
Joined: 08 Feb 2011
Total Posts: 10790
25 Dec 2011 01:19 AM
@TheNew
y u mak everything so complicated??

function bullet(hit)
hum = hit.Parent:findFirstChild("Humanoid")
if hum ~= then
hum:TakeDamage(10) -- Change number for higher/lower damage
end
end
script.Parent.Touched:connect(bullet)
Report Abuse
TheNewScripter is not online. TheNewScripter
Joined: 02 Mar 2010
Total Posts: 2432
25 Dec 2011 01:37 AM
@TwoBoo

What happens if I rename my Humanoid. Oh snap, I am now immune to all ROBLOX weapons, and now this weapon.
Report Abuse
litozinnamon is not online. litozinnamon
Joined: 21 Dec 2009
Total Posts: 891
25 Dec 2011 03:31 AM
True..but I don't think most people would rename their humanoid ingame
Report Abuse
ybmul1380 is not online. ybmul1380
Joined: 20 Feb 2011
Total Posts: 1514
25 Dec 2011 03:40 AM
Or you could just go through every single script until you see somthinglike:
(Hmanoid.-Health(50)) it would look somthing like that
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