So basically, let's say when I hit a part, and its my right leg, is there a way i can make it print the location, eg:
OUTPUT: game.Players.PlayerName.Humanoid.RightLeg
supa dupa simple
script.Parent.Touched:Connect(function(hit) print(hit:GetFullName()) end)
Try this: Parent the script under the detection part
local detectPart = script.Parent detectPart.Touched:Connect(function(part) if part then if part.Parent:FindFirstChild("Humanoid") or part.Parent.Parent:FindFirstChild("Humanoid") then print(part.Position) end end end)
Really easy to do! This script that I made down below checks if whatever touches the part is a humanoid (player) and prints what has touched the part.
script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then print(hit.Name .." has touched the part") end)