Healing Tool not working

So, I want a tool that heals you by ten health, it works but after 1 second or so it will go back to the original health value. The script is super short so that must be something that I’m missing. Here’s tthe script.

local AppleTool = script.Parent
local player = game:GetService("Players").LocalPlayer

local HealingAmount = 10

AppleTool.Activated:Connect(function()
	player.Character.Humanoid.Health = player.Character.Humanoid.Health + HealingAmount
	AppleTool:Destroy()
end)

Through this, I infer you are using a local script. Modifying health through the local script will not replicate to the server.

Put this in a script inside your tool.

script.Parent.Activated:Connect(function()
	
	script:FindFirstAncestorWhichIsA("Model"):FindFirstChildWhichIsA("Humanoid").Health += 10
	
	script.Parent:Destroy()

end)
1 Like

Instead of doing this you can also do this:

player.Character.Humanoid.Health += HealingAmount
1 Like

you use a local script, so it will work only in local, other players cant see it.
use a server script.

It didn’t work at all, nothing happened.

is there any error in the output ?

No, just nothing at all. 30 limit

print("Script Running")
script.Parent.Activated:Connect(function()

    print("Activated")
	
	script:FindFirstAncestorWhichIsA("Model"):FindFirstChildWhichIsA("Humanoid").Health += 10
	
	script.Parent:Destroy()

end)

can you add this code then send me the output.

Nothing at all, which means that the script isn’t working or running.

can you send me the explorer. where is the script

The Parent of the script is the tool.

can you send an image
char limit char limit

bc09704d6eb645003a85e54eb3e9737c

why it is in replicated storage ?

try putting it in starter pack

Because you need to buy it first (Shop system thingy)

no add it just to try
char limit

It worked some how char limit char limit

try putting it inside server storage and clone it to players backpack from the serverstorage, mark me as solution if it worked :slight_smile:

Did you disable the Tool.RequiresHandle property?

If not, try that and inform us as scripts don’t usually run when you have no part named “Handle” in your tool and have this property enabled.