I'm practicing but not sure how to make a value decrease like say I try to make a brick that makes your health -20 on hit, but not 20 health, just subtracts 20 from your current health. How do I do that? And I assume it would be the same for reflectance or something like that too.
script.Parent.Touched:connect(function(hit)
print(hit)
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health -20 --Doesn't work
end)
thanks

4 comments
Hmm I tried it but it's erroring at the ) by the end, so I removed it and then the "if obj.Parent:FindFirstChild("Humanoid") then" errored
Is that with this current version? I edited it because I forgot something
Thanks that worked! Do you think you can PM me why the script has to be so complicated and teach me a little about it?
Sure