local Hitbox = script.Hitbox -- It just part
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAppearanceLoaded:Connect(function(Character)
local HumanoidRootPart = Character.HumanoidRootPart
if not HumanoidRootPart then
return
end
for _, v in pairs(Character:GetChildren()) do
if v:IsA("MeshPart") then -- Check Is BodyPart
v.CanQuery = false
v.CanTouch = false
else
return
end
end
local Cloned = Hitbox:Clone() -- Hitbox replaces the touch function
Cloned.Parent = Character
Cloned.CFrame = HumanoidRootPart
Cloned.WeldWithHRP = HumanoidRootPart
end)
end)
2 Likes