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 » Club Houses » Clans & Guilds
Home Search
 

Re: @C&G scripters

Previous Thread :: Next Thread 
DHSR is not online. DHSR
Joined: 08 Mar 2015
Total Posts: 1424
15 Aug 2016 10:02 AM
I've created a gun, but when I click on an area by looking over the part obstructing it, it goes right through the part (wallshooting)

What is the fix for this?
Also how can I prevent shooting if the handle is obstructed? (this way you can't put your gun through the wall and shoot)


[insert lame siggy here]
Report Abuse
legomada is not online. legomada
Joined: 16 Jan 2009
Total Posts: 652
15 Aug 2016 10:07 AM
It's usually best to make the ray from the player's torso, rather than the handle of the gun, to prevent it from firing through stuff. The only times when this will really be visible is when you're trying to shoot something between your gun and torso (AKA never in actual combat).
This is the ray, not the bullet. The bullet should still fire from the barrel.
Report Abuse
c_p is not online. c_p
Joined: 25 Feb 2016
Total Posts: 1427
15 Aug 2016 10:08 AM
glhf
Report Abuse
RobotWeegee101 is not online. RobotWeegee101
Joined: 21 Aug 2010
Total Posts: 20899
15 Aug 2016 10:09 AM
the solution is to just use SMG scripts, just kidding, but the scripters forum would probably have an answer for you
Report Abuse
DHSR is not online. DHSR
Joined: 08 Mar 2015
Total Posts: 1424
15 Aug 2016 10:11 AM
@lego that will probably fix the issue of wallshooting directly

but the issue right now is that it's wallshooting completely when I look directly over a wall even if I'm 100 studs away from the wall itself (I'm zooming out and it's shooting straight through it only when I click past the wall)


[insert lame siggy here]
Report Abuse
legomada is not online. legomada
Joined: 16 Jan 2009
Total Posts: 652
15 Aug 2016 10:15 AM
Are you actually using FindPartOnRay to check whether there's anything in the way?
Report Abuse
DHSR is not online. DHSR
Joined: 08 Mar 2015
Total Posts: 1424
15 Aug 2016 10:15 AM
Er... no..
I'm using this.
local part, pos = workspace:FindPartOnRayWithIgnoreList(ray, {plr.Character, workspace.BulletDump}, false, true)


[insert lame siggy here]
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Clans & Guilds
   
 
   
  • 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