Why won't this work?
r = script.Parent.Parent.Name
function heal()
local health = game.Players.r.Humanoid.Health
health = health+50
script.Parent.Handle.Sound:play()
wait(5)
end
script.Parent.Activated:connect(heal)
Please help! Thanks
EDIT: I edited the script according to CreativeEnergy's answer to the following:
r = script.Parent.Parent.Name
function heal()
local h = game.Workspace:FindFirstChild(r).Humanoid.Health
h = h+50
script.Parent.Handle.Sound:Play()
end
script.Parent.Activated:connect(heal)
Now the output tells me I'm attempting to index a nil value on line four. Need more help.

2 comments
Output says "R is not a valid member of Players"
"Now the output tells me I'm attempting to index a nil value on line four. Need more help." -- this means that there is no model named the same as script.Parent.Parent.Name in the workspace. What is script.Parent.Parent.Name ? Try printing 'r' between lines 3 and 4