|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 27 Mar 2015 03:09 PM |
would that work for a whole model?
b a man |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 27 Mar 2015 03:12 PM |
| idk, go to scripters forum and post this |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2015 03:28 PM |
| Turn the guns can collide off |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2015 04:16 PM |
cancollide is alreay false
b a man |
|
|
| Report Abuse |
|
|