Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How can I make a bullet go through a part?

Asked by
hellmatic 1523 Moderation Voter
6 years ago

Is there any way to make a bullet go through a certain part? Or to let the Player's mouse ignore the certain part?

2 answers

Log in to vote
1
Answered by
hellmatic 1523 Moderation Voter
6 years ago

with raycasting,

Mouse.TargetFilter = part

with raycasting, extend the length of the 'ray' so it goes through a wall

Ad
Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Try defining the parts that you dont want it to go through and then removing the bullet when it touches that part

This script will make the bullet go through all the parts except for the part with the name you put

example

local bullet = script.Parent

bullet.Touched:connect(function(hit)
if hit.Parent.Name = "name all parts that you want the bullet to not go through the same" then
bullet:Remove()
else
print("k")

Answer this question