Every type of script has a Disabled property. In your script, you can make it so when the Execute button is clicked, the Disabled property is off, so it enables the script to run. You can also make a Stop button that stops the script from running, just make it so that it changes the script's Disabled property to true.
NOTE: Make sure before you save your game, the script's Disabled is true so it doesnt run until you click execute.
EXAMPLE:
local myScript = workspace.Script
local executeButton = script.Parent
local disableButton = script.Parent.Parent.Disable
executeButton.MouseButton1Down:connect(function()
myScript.Disabled = false
end)
disableButton.MouseButton1Down:connect(function()
myScript.Disabled = true
end)
Hope this helped :)
3 comments
The question doesn't make any sense. LocalScripts run in GUIs... What are you asking?
Whenever you post a question, you need to give a detailed and understandable explanation of what you're wanting help with, so that the helpers can better help you.
Set a source of a localscript to what the textbox sasys