So, I have been trying to add a medic class into my roblox game. I decided that it would need a tool that would be able to heal teammates. I made the tool, (the entire tool is all in the part "Handle"). I put this script into my tool hoping it would make the tool heal any humanoid that touched the part. Here is the script:
local debounce = false game.Players.LocalPlayer.Backpack.Healing.Handle.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then if not debounce then debounce = true while hit.Parent.Humanoid.Health <100 do hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Heath + 25 wait(5) end wait(5) debounce=false end end end)
Personally, I am a new scripter and I think the proble may be about how I defined the tool. It all seemed right though.
The tool is called: Healing. The handle is called: Handle
Please tell me how to fix this code, Thanks!