This is in a local script
--//Variables local player = game.Players.LocalPlayer local character = player.Character local humanoid = character:WaitForChild("Humanoid") local rightArm = character:WaitForChild("RightLowerArm") local userInputService = game:GetService("UserInputService") --//Debounces local debounce = false local debounce2 = false --//Animation local animation = Instance.new("Animation") animation.AnimationId = "http://www.roblox.com/asset/?id=2637322749" local loadAnimation = humanoid:LoadAnimation(animation) --//InputBegan userInputService.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.Q and not debounce then debounce = true loadAnimation:Play() wait(1) debounce = false end end) --//TouchedEvent rightArm.Touched:Connect(function(hit) if debounce and hit.Parent:FindFirstChild("Humanoid") and not debounce2 then debounce2 = true hit.Parent.Humanoid:TakeDamage(15) wait(1) debounce2 = false end end)
What i'm trying to do is make a punching script that can hit multiple players at once but using the touched event only allows me to hit one at a time as you can see here,
https://gyazo.com/ed58afe2cfca5c3e808307c5669e25a1
The arm is touching both dummies but it randomly chooses the closest one.