of     1   

Embolical
#226319563Friday, October 13, 2017 9:02 AM GMT

Hello, I'm not new to scripting and I've learnt a lot and I've tried and tried with different types of code in different ways but for some reason I just haven't figured it out idk if I'm being dumb rn because I've been up all night to be fair but anyway what I'm trying to figure out is if you're touching a block it will slowly take away health like every two seconds or so I know this is a VERY simple script and I may look like a noob rn but I have been trying to figure this out for like three hours now and I don't know why I cannot figure it out!! any help is appreciated...
Embolical
#226319743Friday, October 13, 2017 9:21 AM GMT

I need help immediately
krzysio200
#226319790Friday, October 13, 2017 9:25 AM GMT

meybe you should make script that hurt thr player and wait 2 sec. before hurt again !!!
Reapqr
#226319825Friday, October 13, 2017 9:29 AM GMT

Did you use lowertorso or just torso in the script?
Embolical
#226319828Friday, October 13, 2017 9:29 AM GMT

that's the idea only I cant do really simple scripts like Health = 99 wait (2) Health = 98 wait (2) because otherwise it glitches and sets it to 99 93 92 58 12 99 randomly
Embolical
#226319859Friday, October 13, 2017 9:31 AM GMT

its the health... health is in humanoid... why would you use the torso
Reapqr
#226319886Friday, October 13, 2017 9:34 AM GMT

Try this... script.Parent.Touched:connect(function(hit) pcall(function() hit.Parent.Humanoid:TakeDamage(5) end) end) I don't know if this works. Have not tried it.
krzysio200
#226319892Friday, October 13, 2017 9:34 AM GMT

Maybe you mustn't change nuber of health but you can decrease a nuber of health by 1 HP ?
krzysio200
#226319910Friday, October 13, 2017 9:35 AM GMT

yes / take damage = decrease health :D
Embolical
#226319911Friday, October 13, 2017 9:35 AM GMT

it just instantly kills
Embolical
#226319932Friday, October 13, 2017 9:37 AM GMT

its going to be a storm and the health slowly decreases and decreases
Reapqr
#226319961Friday, October 13, 2017 9:39 AM GMT

isOff = true function die(part) if part.Parent:findFirstChild("Humanoid") ~- nil and isOff == true then isOff = false for 1, 25 do part.Parent:findFirstChild("Humanoid").Health = part.Parent:findFirstChild("Humanoid").Health - 1 end wait(4) isOff = true end end script.Parent.Touched:connect(die)
Reapqr
#226319976Friday, October 13, 2017 9:40 AM GMT

Or this function touch(hit) hum = hit.Parent:FindFirstChild("Humanoid") if hum ~= nil then hum:TakeDamage(10)--change this end end script.Parent.Touched:connect(touch)
Embolical
#226320001Friday, October 13, 2017 9:43 AM GMT

it just takes it down a bit once
Reapqr
#226320014Friday, October 13, 2017 9:44 AM GMT

Then I'm not sure...
Embolical
#226320025Friday, October 13, 2017 9:46 AM GMT

ill probs just wait until later when I've had a sleep lol probs why I can't think of anything thanks for the help though
krzysio200
#226320032Friday, October 13, 2017 9:46 AM GMT

maybe use wait comand : wait(2)

    of     1