I am trying to disable a script and its not working
game.Workspace.Open.Touched:Connect(function(hit)
if hit then
script.Parent.Robbing.Frame.Time.Script.Disabled = false
end
end)
I am trying to disable a script and its not working
game.Workspace.Open.Touched:Connect(function(hit)
if hit then
script.Parent.Robbing.Frame.Time.Script.Disabled = false
end
end)
The script is disabled when the ‘disabled’ property is ‘true’.
Right now that would disable it if the peoperty were ‘enabled’.
Set it to true instead.
ya i want the script to be disabled
Disabled is the property name, setting ‘disabled’ to true instead of false (as it does currently) stops it from running.
Replace ‘false’ with ‘true’.
ok i will try that
by the way i have a another one to enable it so u think you can help me
i changed the false to true but it is still not disabling
Do you get any error output printed in the output window?
nope ![]()
What does the other script run? If it’s a loop I’ve seen this happen from time to time.
If it uses a loop do
local running = true
repeat
-- whatever goes here
until running == false
then set running to false using a bindable event or remote event.
local time = 80
for i = 1, 80 do
wait(1)
time = time - 1
script.Parent.Text = tostring(time)
end
that is what the script runs ![]()
That should stop as intended, I’m sorry but I don’t know why this isn’t working.
You could move this to #help-and-feedback:scripting-support in case i’m not noticing something here.
Hey, setting the Disabled to true will just prevent it from running when game/player starts/joins, it will not stop the thread (the script while running).
In order to stop the thread, you’ll have to break your for loop using events or such things.
ok I see now thank you ![]()