I made a rifle that fires a bullet every .15 seconds, it works except for what the bullet is supposed to do. Whenever im using the gun, the bullet just deletes itself without even loading its BodyVelocity. I put in a table for the limbs (which i figured wouldnt work), made it so that if its touching a limb from the player it wont destroy itself, and made sure if its touching the rifle it wont destroy itself. Still, its deleting itself. Please help.
I just put a part of the script, if you need the entire script notify me.
if t.Parent.Parent.Name ~= Player.Name or t.Parent.Name ~= "Rifle" then
copybullet:Destroy()
if t.Parent.Name == "Experiment 32: The Living Robot" then
local Hum = t.Parent:FindFirstChildOfClass("Humanoid")
Hum:TakeDamage(20)
end
end
end```