I'm trying to make a projectile (Bolt) destroy a part on touch, but my script fails to do anything. However when I change "Bolt" to "Humanoid" I successfully kill my own character. May anyone inform me on what I'm doing wrong? Thank you :-)

script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Bolt") then
	script.Parent:Destroy()
end
end)

2 comments

0

try instead script.Parent:Destroy() how about change it to the name of the part :Destroy()

0

Are you sure the Bolt is a child of the projectile? You said the projectile was the Bolt anyways.