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 » Game Design
Home Search
 

Re: HOW TO MAKE BULLETS GO THRU WALLS

Previous Thread :: Next Thread 
retartedwiz is not online. retartedwiz
Joined: 26 Sep 2010
Total Posts: 13336
27 Mar 2015 01:44 PM
i had a glitch with this one gun, but thanks to the forums, i cold fix it.

but now that it's fixed, i have another glitch

the gun will not work in first person, or when shooting forward, because the gun is blocking the bullets like a wall would

how to fix????


this is the post i made for the first problem
http://www.roblox.com/Forum/ShowPost.aspx?PostID=158719002

and this is the gun model if you need to take a look at it
http://www.roblox.com/laser-item?id=230632170

b a man
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
27 Mar 2015 01:55 PM
When raycasting make sure that the part you want ithe bullet to go through is on the ignore list
Report Abuse
retartedwiz is not online. retartedwiz
Joined: 26 Sep 2010
Total Posts: 13336
27 Mar 2015 02:41 PM
@yobo, how would i make sure it ignors the gun?

function raycursive(start,dir,ignore) -- bad pun lol
newdir = (start+dir)-start
local hit,pos = workspace:findPartOnRay(Ray.new(start,newdir.unit*999.999),ignore)
if hit and rays <= 5 then
if (hit.CanCollide==false and (hit.Name~="Shield" and hit.Name ~= "Left Arm" and hit.Name ~= "Left Leg" and hit.Name ~= "Right Arm" and hit.Name ~= "Right Leg")) then
rays = rays + 1
return raycursive(pos,dir,hit)
else
rays = 0
return hit,pos
end
else
return hit,pos
end
end

b a man
Report Abuse
retartedwiz is not online. retartedwiz
Joined: 26 Sep 2010
Total Posts: 13336
27 Mar 2015 02:55 PM
i tried


function raycursive(start,dir,ignore) -- bad pun lol
newdir = (start+dir)-start
local hit,pos = workspace:findPartOnRay(Ray.new(start,newdir.unit*999.999),ignore("lazergun")) -- because the model name is lazergun
if hit and rays <= 5 then
if (hit.CanCollide==false and (hit.Name~="Shield" and hit.Name ~= "Left Arm" and hit.Name ~= "Left Leg" and hit.Name ~= "Right Arm" and hit.Name ~= "Right Leg")) then
rays = rays + 1
return raycursive(pos,dir,hit)
else
rays = 0
return hit,pos
end
else
return hit,pos
end
end

but that broke the gun and made it not shoot at all

b a man
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
27 Mar 2015 03:03 PM
if u have the script inside the brick you want it to ignore, then local hit, position = game.Workspace:FindPartOnRay(ray, BRICK HERE)
Report Abuse
retartedwiz is not online. retartedwiz
Joined: 26 Sep 2010
Total Posts: 13336
27 Mar 2015 03:09 PM
would that work for a whole model?

b a man
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
27 Mar 2015 03:12 PM
idk, go to scripters forum and post this
Report Abuse
FauxSundew is not online. FauxSundew
Joined: 27 Apr 2014
Total Posts: 1316
27 Mar 2015 03:28 PM
Turn the guns can collide off
Report Abuse
retartedwiz is not online. retartedwiz
Joined: 26 Sep 2010
Total Posts: 13336
27 Mar 2015 04:16 PM
cancollide is alreay false

b a man
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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