So I've tried multiple ways to mess around with onTouch and finding the humanoid, but I wasn't quite able to make a kill brick that only kills a player if it touches their head. When attempting and asking people, they've told me I was way off. Could someone please help me out?
✓ ANSWER ACCEPTED
How would I kill a player only if their head touches a part?
1 answer
✓ Accepted answer
Hey Supergamerboy1995,
What you are asking for is quite simple when understood. You just need to use the .Touched event, and the parameter of that event is the part that touched. Then, you check if the part's name is "Head" Well, it's easier to show rather than just talk about it, so here is my script, I'll explain it line by line.
####Script to kill people if the part touches their head
local part = script.Parent; -- The part that will be touched.
part.Touched:Connect(function(obj) -- The anonymous function for the touch.
local hum = obj.Parent:FindFirstChild("Humanoid"); -- The humanoid that could be found in the part's parent.
if obj.Name == "Head" and hum then -- Checks if the name is "Head" and checks if the humanoid exists.
-- Kill player
end -- end for if statement
end) -- end for function
##Well, I hope I helped, and have a nice day.
###Thanks,
###~~ KingLoneCat
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
If the place has projectiles, one should always make sure "obj.Parent" exists before using it (ie start of line 4 should then be "local hum = obj.Parent and ...")
The parent will always exist if the part is able to be touched.
Oh! When explained that seems simple to understand, thanks!
No problem.