Hi, at the moment this script will work but when my character touches the brick it sometimes loses health or gains health. I have tried making the numbers both negative but that just errors. So, I would appreciate it if anyone could help me with this?
script.Parent.Touched: connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid ~= nil and humanoid.Health > 0 then
local f = Instance.new("Fire", hit.Parent)
f.Color = Color3.new(0, 85, 255)
humanoid.Health = math.random(35, 100)
end
end)

2 comments
This also never fails as the Health property keeps changing.
Thank you very much I don't know why I didnt think of that!