Hi guys, so lately I've been making a simple gun system, and I've added a melee (which is just hitting with the gun itself). This is the code: tool.Base.Touched:connect(function(hit)
if meleeing and hit and hit.Parent and hit.Parent ~= tagged and hit.Anchored == false then
tagged = hit.Parent
hit.Velocity = character.Torso.CFrame.lookVector * 60
wait(.5)
tagged = nil
end
end)
So, my problem is:
This part of the script does not work on players, but for some reason works on NPCs.
Can someone explain to me what's the problem? I'd really appreciate it.