I am new to scripting and making gear, so I might have done a obvious mistake. I'm trying to make a healing apple, but my script does not work and there no error in the output. This is my code
local tool = game.Parent
local function OnActivate()
print("Player Healed")
local character = tool.parent
local humanoid = character.Humanoid
humanoid.Health = humanoid.Health + 20
tool:Destroy()
end
local function OnDeactivate()
print("Player has been healed")
end
tool.Activated:Connect(OnActivate)

1 comment
Thanks that worked. I keep doing game.parent for some reason.