Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Part Damaging multiple humanoids?

Im tryna make a Projectile damage multiple humanoid at once. The only thing is it damages 1 humanoid at once. I put a group of humanoids in a spot and shot a projectile at them, only ones was damaged or it didn't even damage at all. Please help, this is what I have

DamageImpact = Power.Touched:Connect(function(hit)
			DamageImpact:disconnect()
				local HumanoidFound = hit.Parent:WaitForChild('Humanoid')
				if HumanoidFound and HumanoidFound ~= Player.Character:WaitForChild('Humanoid') then
						print('found')
							HumanoidFound:TakeDamage(10)
						end
				end	
			
		end)

1 answer

Maybe this will help?

bullet.Touched:connect(function(pp)
	if not pp.Parent then return end
	if not pp.Parent:FindFirstChild('Humanoid') then return end
	pp.Parent:FindFirstChild('Humanoid'):TakeDamage(5)
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.