Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Made a code that enable a fire but i want to disble it again but how?

i made a script in Roblox Studio that enables fire but i need help to disable the fire

here's the code :

script.Parent.ClickDetector.MouseClick:Connect(function(plr) game.Workspace.Part.Fire.Enabled = true end)

btw in a ClickDetector

1 comment

0

:Disconnect() or a debounce would help you.

1 answer

✓ Accepted answer

It is very easy to make! All you have to do that use debounce.

Here is your script

local debounce = false

script.Parent.ClickDetector.MouseClick:Connect(function(plr)
	if debounce == false then
		debounce = true
		workspace.Part.Fire.Enabled = true
	else
		debounce = false
		workspace.Part.Fire.Enabled = false
	end
end)

You can read more here

1 comment

0

Thank you so much :D

This discussion is preserved as it was. New answers, comments, and votes are closed.