I'm making a first aid kit and it almost all works properly, adds to the players health but as soon as it adds to the players health less than a second later the players health goes back down to where it originally was.
local Tool = script.Parent
local Player = game:GetService("Players").LocalPlayer.Name
local healAmount = 30
local sound = script.Parent:FindFirstChild("FirstAid")
print(Player)
Tool.Equipped:Connect(function(Mouse)
Mouse.Button1Down:Connect(function()
print("Button1Down")
local Playeruser = game.Workspace:WaitForChild(Player)
local humanoid = Playeruser:FindFirstChildWhichIsA("Humanoid")
local currentHealth = humanoid.Health
local newHealth = currentHealth + healAmount
humanoid.Health = newHealth
sound:Play()
wait(3.344)
Tool:Destroy()
end)
end)
Could someone tell me why? Thanks!

2 comments
Is your script local? You can only change health on the server.
Yeah it is, but how would I get the player with the server script