Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I change my script so when humanoid leaves part it will stop healing humanoid?

Asked by 6 years ago

What could I change or add to make it so when the humanoid stops touching the part it will stop healing them?

local Enabled = true



script.Parent.Touched:Connect(function(Hit)

    if Hit.Parent:FindFirstChild("Humanoid") and Enabled == true then

        Enabled = false

        repeat

        wait(0.2)

        Hit.Parent.Humanoid.Health = Hit.Parent.Humanoid.Health + 10

        until Hit.Parent.Humanoid.Health <= 0

        Enabled = true

    end

end)

0
i have an idea Lolamtic 63 — 6y
0
pput around the brick invisible walls if u touch them they will disable the script so it will stop heal Lolamtic 63 — 6y
0
and if u touch the heal block it wll enable the script ;DD!!! if u dont know what disabled and enabled means looks at properties of script and look for Disabled u can turn it off and on Lolamtic 63 — 6y
0
No. Just have another touched event from the same script with invisible blocks. hiimgoodpack 2009 — 6y
View all comments (2 more)
0
So you used my script but you gave someone else the "Correct Answer" :? INOOBE_YT 387 — 6y
0
sorry INOOBE i fixed the correct answer sorry I messed up :/ NegativeNil 0 — 6y

Answer this question