The only function of the three that triggers is ragdollCharacter and I don’t know why.
There’s something wrong with the if statements, but I don’t know what.
radiusBall.Touched:Connect(function(touchedPart)
if touchedPart:IsA("BasePart") and touchedPart.Parent:FindFirstChild("Humanoid") then
local touchedCharacter = touchedPart.Parent
local torso = touchedCharacter:FindFirstChild("Torso")
local brokenLimbs = touchedCharacter:WaitForChild("BrokenLimbs")
print(touchedPart.Name)
if not playersDamaged[touchedCharacter.Name] then
playersDamaged[touchedCharacter.Name] = true
ragdollCharacter(touchedCharacter, torso, brokenLimbs, radiusBall.Position)
if touchedPart.Name == "Torso" then
damagePlayer(touchedCharacter, torso, radiusBall.Position)
elseif touchedPart.Name == "Right Leg" or touchedPart.Name == "Left Leg" or touchedPart.Name == "Right Arm" or touchedPart.Name == "Left Arm" then
breakLimb(touchedCharacter, touchedPart, brokenLimbs, radiusBall.Position)
end
end
end
if touchedPart.Name == "HitBox" and touchedPart.Parent ~= mineModel then
touchedPart.Parent.StartDetonation.Value = true
end
end)