Hi, I was reading through the Health Pick Up tutorial on the Roblox Wiki and I'm having trouble understanding it. Here's the code I'm looking at.
local healthPack = script.Parent
local function handleTouch(otherPart)
local character = otherPart.Parent
local humanoid = character:FindFirstChild('Humanoid')
if humanoid then
print('We should heal!')
end
end
So on line 3 they put the reference in for the function, then in line 4 they put "local character = otherPart.Parent" so the parent of a reference for a function is always the player? If not then how do you tell what the parent is for a reference? Any help is appreciated.

1 comment
Thank you so much! I really appreciate it!