Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do i make a touched event for 2 parts at once?

Asked by
Jumbuu 110
8 years ago

lets say i want a zombie to attack, i can only make the right arm do damage but not the left, how do i enable it so that both of the arms can do damage?

1 answer

Log in to vote
1
Answered by 8 years ago
Edited 8 years ago

Just add the same script you are using for the left arm to the right arm.... They will run at the same time...

Zombie = workspace.Zombie
Zombie.RIghtArm.Touched:connect(function(Hit)
if Hit.Parent:findFirstChild("Humanoid") then
Hit.Parent.Humanoid.Health = Hit.Parent.Humanoid.Health - 50
end
end)
Zombie.LeftArm.Touched:connect(function(Hit)
if Hit.Parent:findFirstChild("Humanoid") then
Hit.Parent.Humanoid.Health = Hit.Parent.Humanoid.Health - 50
end
end)
Ad

Answer this question