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

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

Asked by 10 years ago

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

Log in to vote
0
Answered by
Ekkoh 635 Moderation Voter
10 years ago

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

0
local humanoid = hit.Parent:findFirstChild ("IronMine") qwertyz27 0 — 10y
Ad
Log in to vote
-1
Answered by
Gamenew09 180
10 years ago

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.

0
It actually should be `or`, not `and` because the Humanoid's name can't be both "IronMine" and "SteelMine". Ekkoh 635 — 10y
0
Thanks! I was tired when I wrote this... Oh well. Gamenew09 180 — 10y

Answer this question