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

How to stop a script?

Ok, so let's say I want to stop a script when something certain happens. You can't just use end or it will not even bother running the script.

Example:

game.Players.jaytheidiot.Chatted:connect(function(Msg)
if Msg == "lol" then
Workspace.jaytheidiot.Torso:Destroy()
elseif Msg == "Hi" then
--Stop the script from running here
end
end)

How would I get the script to stop in that location?

1 answer

probobly just put return, im not sure if that will work. If you want that the dude say hi, then the script gets disabled(witch means that the script wont work anymore, even if he says lol, nothing will happen), then put:

script.Disabled = true

1 comment

0

The script in question is running on a script builder. Not on an actual place. I have tested and using that in place will not work.

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