I wrote a script to make the player take 1 damage every .1 seconds. I thought using a while true do would be a correct way to do it, but apparently it isn't
local SP= script.Parent
local function steppedOn(part)
local Parent = part.Parent
if game.Players:GetPlayerFromCharacter(Parent) then
while true do
Parent.Humanoid:TakeDamage(1)
wait(.1)
end
end
end
