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 » Scripters
Home Search
 

Weapon won't penetrate hats?

Previous Thread :: Next Thread 
GoldMako is not online. GoldMako
Joined: 05 Sep 2010
Total Posts: 106
31 Dec 2016 01:29 AM
Alright, So the gun fires perfectly fine, And can damage any part of the body that does not have a hat on it. But when I shoot a bullet at a hat, the bullet won't penetrate and it will just stop. No damage will be done to the player

I have no idea how to fix this and I would appreciate some help.

Thanks.


Report Abuse
128Gigabytes is not online. 128Gigabytes
Joined: 17 Apr 2014
Total Posts: 3616
31 Dec 2016 01:34 AM
Check if the object it hits is named Handle and if so ignore it as if it had hit nothing.
Report Abuse
GoldMako is not online. GoldMako
Joined: 05 Sep 2010
Total Posts: 106
31 Dec 2016 01:38 AM
Im a little dumb with scripting, But I don't think that is the problem. The bullet will stop just infront of the characters hat. If you need to, I can screenshot/copy and paste the script.


Report Abuse
GoldMako is not online. GoldMako
Joined: 05 Sep 2010
Total Posts: 106
31 Dec 2016 01:49 AM
I did also find this line of script:

Ray_Ignore = {Character, Ignore_Model, Camera}

Not sure if that is the solution.



Report Abuse
PhantomVisual is not online. PhantomVisual
Joined: 08 Apr 2011
Total Posts: 2025
31 Dec 2016 01:55 AM
If you found it with the gun script, just add Handle into the list and maybe that will work.


Report Abuse
GoldMako is not online. GoldMako
Joined: 05 Sep 2010
Total Posts: 106
31 Dec 2016 01:57 AM
Alright. I found it in "gunglobalizers"
Report Abuse
kaddad14 is not online. kaddad14
Joined: 13 Apr 2013
Total Posts: 649
31 Dec 2016 02:16 AM
Never use a script you don't understand, it always leads to problems.
Report Abuse
GoldMako is not online. GoldMako
Joined: 05 Sep 2010
Total Posts: 106
31 Dec 2016 02:38 AM
I understand it, just it's kind of hard to fish through 600+ lines
Report Abuse
kaddad14 is not online. kaddad14
Joined: 13 Apr 2013
Total Posts: 649
31 Dec 2016 02:47 AM
Well, somewhere in there add a re-stricter thing that makes it so the ray doesn't calculate a stop if theres a hat. Or just name any hats the name that the bullet penetrates (if it goes by name and not type).
Report Abuse
HexaDecival is not online. HexaDecival
Joined: 13 Dec 2015
Total Posts: 144
31 Dec 2016 04:09 AM
If the gun system is based around RayCasting, you have to direct the ignorelist to an ancestor of the exact instance you want to ignore, therefore you will need to do something like iterating through each player and finding their hats then adding that to an ignorelist.

An otherwise simple solution is not having hats at all.

Another solution is you could to try to find a humanoid in the grandparent of what was hit by the raycast, if the handle of a hat inside a character was hit, it'd find a humanoid, if a humanoid was found - deal damage to it.

Note that the final solution allows people to damage others by shooting at their hats.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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