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

How do I make a certain tool/weapon hurt MORE than one SPECIFIC humanoid?

So I'm making an RPG game and I have a pickax that hurts only the humanoid called: "IronMine." But, I want it to also hurt "SteelMine." I've tried changing many things within the sword script of the tool... but I just can't seem to fix it. Help? Lol

This is the line in the sword script that I'm trying to fix:

local humanoid = hit.Parent:findFirstChild ("IronMine")

2 answers

Post the SwordScript and the places you've tried editing.

1 comment

0

local humanoid = hit.Parent:findFirstChild ("IronMine")

Where you check for the humanoid name "IronMine" add the following

or humanoid.Name == "SteelMine" then

It should look like: if humanoid.Name == "IronMine" or humanoid.Name == "SteelMine" then

There you go, if I helped please vote this answer and put this as the answer.

2 comments

0

It actually should be or, not and because the Humanoid's name can't be both "IronMine" and "SteelMine".

0

Thanks! I was tired when I wrote this... Oh well.

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