I have basically a large, non cancollided brick that takes over the map. Inside it are 4 scripts, one of them being inside a playable, working Sound. Another is called Projector, one that shows a hint when the other scripts are played. That one also works fine. The problem is the two remaining scripts, called Lava and Activator. Lava is basically this:
function onTouch(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then humanoid.Health = 0 end end script.Parent.Touched:connect(onTouch)
Normally, this script works fine. The other script, called Activator, has the task to activate (de-disable) the Lava script in a re-occuring event.
while true do wait(10) script.Parent.Lava.Disabled = false wait(1) script.Parent.Lava.Disabled = true wait(0.1) end
Now, this event does work.. But only once. The output doesn't put much either, just acts like the script just is supposed to run once and never again. I'm sure it's something obvious, but I do not imagine there being scripts interfering with it, as I each name them individually. The weird thing is, the other two scripts run fine, and re-occur periodically, but just these two don't work. Help would be much appreciated, thank you!
You disable it for 10.1 secconds and then enable it for one seccond. That's probably the issue.
You don't even have to disable it An event can fire infinite ammounts of time.