So I don’t know how to make a kill brick embedded within the humanoid. For example, if I want to kill with the humanoid’s right arm (custom humanoid rig btw) do I just create a script in the right arm?
The script in the right arm:
function onTouched(h)
local h = h.Parent:FindFirstChild("Humanoid")
if h ~= nil then
h.Health = 0
end
end
script.Parent.Touched:Connect(onTouched)
When I touch another player nothing happens even though the “arm” part physically touched the other player. Is there another way to make a kill brick that is also part of a player (kinda like a sword).
1 Like
Greeting! This is honestly very difficult for me to solve, firstly because I don’t understand the question, and secondly because the scripts are fine. Maybe you put a block on the player’s hand (of course you arrange it to be a decoration like a glove or something like that first) and that element will kill everyone he touches (if that’s what you mean). Greeting from BaconHair_Jacki
The question is can I use the player’s arm as a kill brick?
That script should work just fine as long as you put the script in the player’s RightArm, or any BasePart
object. The BasePart that the script is inside of will act as a kill brick.
…Also you might want to change the wording of the beginning of your second paragraph…
I think you can, but that would take time, to find right scripts and everything else.
You could just do the same thing but then you add
and h ~= rightArm.Parent.Humanoid
1 Like
Where do I add h~= rightArm.Parent.Humanoid, does it replace h~= nil?
No, you add a and to your if statement and place it (Just a thing but you could do if h then instead of if h ~= nil then).
function onTouched(h)
local humanoid = h.Parent:FindFirstChild("Humanoid")
if humanoid and humanoid ~= script.Parent.Parent.Humanoid then
--Basically this checks if the humanoid isnt nil and checks if the humanoid isnt the same of the person that has the right hand that kills
h.Health = 0
end
end
script.Parent.Touched:Connect(onTouched)