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?
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