Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Workspace.SCP-075.SCP.Part.Script:4: attempt to index nil with 'Health' server script help?

function onTouched(part) local h = part.Parent:findFirstChild("Humanoid")

h.Health = h.Health -25
        wait(2)
h.Health = h.Health -5

end

script.Parent.Touched:connect(onTouched)

1 comment

0

?? what are you trying to do please explain

1 answer

Read this before you post: https://scriptinghelpers.org/help/community-guidelines right now it's a little hard to understand what is going on here

now I don't know if "-25" is an actual way to subtract a value but I'm assuming it isn't. See if that works.


h.Health = h.Health - 25
        wait(2)
h.Health = h.Health - 5

If not lmk

This discussion is preserved as it was. New answers, comments, and votes are closed.