local function OnTouched(shot, otherPart)
local character, humanoid = FindCharacterAncestor(otherPart)
if otherPart.ClassName == "Part" then
if otherPart.Name ~= "Handle" then
shot:Destroy()
end
end
if character and humanoid and character ~= Character then
ApplyTags(humanoid)
if shot then
local hitFadeSound = shot:FindFirstChild(HitFadeSound.Name)
if hitFadeSound then
hitFadeSound.Parent = humanoid.Torso
hitFadeSound:Play()
end
end
Dematerialize(character, humanoid, otherPart)
end
end
This is a little part of the script of the Hyperlaser. I have editted so if the bullet hits a part then it destroys itself, but it destroys objects if they have humanoids inside them. I have a tycoon with humnaoids in all the buttons and if you shoot the buttons then they get destroyed. Please help so it checks to if the bullet collides with a players humanoid and not a part humanoid?
