I'm working on a healing spell, and I cant seem how to figure out how to heal the player. When I click, it prints what I want it to, but doesn't heal. I think I probably am missing a few things in my code. I tried the wiki but cant seem to find the solution to my problem. here is my code
local tool = script.Parent
local field = nil
local character = tool.Parent
local human = character:FindFirstChild("Humanoid")
function heal()
if (human ~=nil) then
human.Health = human.Health + 25
end
end
tool.Activated:Connect (function()
heal()
print ("healed")
end)
I'm not asking for anyone to rewrite it, just point out what I messed up/missed out. Thanks in advance! :)

4 comments
hmm, Doesn't seem to do anything now. I tried putting this into a local script and got the same results. I might have to just redo it, idk :/
Oh, and I forgot to mention, the output is giving me this error: attempt to index nil with 'Character'
do local character = player.Character or player.CharacterAdded:Wait() on line 4
sometimes the character doesn’t load yet that’s why add that on line 4