Hello,
I have a need for weapon bullets to hit parts where the part has transparency set to 1.
The problem is all weapon systems I have tried out ( FE or ones that use raycasting) shoot through the part. I have notice that if the part transparency is set to .8 or higher, the bullets go through it.
Does anyone have an idea why and how I can fix it so that they hit parts that have a transparency set to 1?
Thanks for any information.
I don’t have experience with this kit but I’m guessing this is in place to ensure that if you have invisible parts the bullet doesn’t just stop mid air for no reason.
One way to fix this issue would be to use a script to detect when a bullet hits the part and then apply some kind of damage or other effect to the part or to the object that fired the bullet. You could do this using the Touched event on the part and checking the Name property of the object that touched it to see if it is a bullet.
Here is an example of how you could use a script to detect when a bullet hits a part and apply damage to the part:
function onTouched(otherPart)
if otherPart.Name == "Bullet" then
-- Apply damage to the part
end
end
part.Touched:Connect(onTouched)
I hope this helps! Let me know if you have any questions.
Hi, thanks for the info.
I was trying to not use onTouched, because they say it is not totally reliable / good. Thus looking into raycast or a FE gun kit, but then hit this issue.
I was hoping someone with Raycasting knowledge might know why.