So, I've been attempting to create a poison gas object, and the only problem I've faced thus far is damaging others. Using .Touched, whenever the person being effected stops moving, they're not damaged. Using magnitude, I lag half to death. Any ideas? Thanks as usual! :)
There's an event called TouchEnded that does exactly what you think it does. You can combine it with Touched so that they constantly take damage while touching the cloud. Something like this:
touching = false function damage(hit) if hit:FindFirstChild('Humanoid') then player = hit touching = true while touching do hit.Humanoid:TakeDamage(1) wait(.1) end end end function stoptouch(stopped) if stopped == player then touching = false end end