Hi so ive got this little script that ive been working on
while wait(4.090) do
script.Disabled = true
function onTouch(part)
local humanoid = part.Parent:FindFirstChild("Humanoid")
if (humanoid ~= nil) then
humanoid.Health = 0
while wait(4.090) do
end
end
script.Parent.Touched:connect(onTouch)
end
end
this is used to make a "part" becoming deadly after 4.090 sec, what i want is that the part become deadly while like 2 sec and after it become passive, and after it wait again 4 sec to become deadly, i have a idea of what im trying to do here but need some help

5 comments
Can you use a code block? Also, what exactly do you mean?
I don't think your supposed to put the 'script.Disabled = true' part in a while loop
If you enable and disable scripts in your game it means you have bad code design. Look at what you need to do and how this cand be done in the code.
Code block is done and im trying to put countdown on those commands
The fact that you even have to disable the script in the first place is concerning. Very bad coding practices.