Hello, I’m making my plugin. But sometimes It have bugs, which normal game script won’t have, like execution time, where if script lag for 10-15 seconds it will be cancelled. Is there any way to make same thing for plugin, or maybe somehow halt it in this situations?
No, if you mean the automatic script timeout in-game then there is no such thing for plugin development (the plugin will run until you force quit Studio). The best options are to avoid unterminating while true do
loops and also adding a kill switch (if you have a GUI).
Edit: By kill switch I mean this:
local killSwitch = false -- won't be included in production build
-- killSwitchButton is a normal button added in the dev build
-- with no other purpose than to force quit the plugin
killSwitchButton.MouseButton1Click:Connect(function()
killSwitch = true
end)
while true do
if killSwitch then break end
-- do plugin stuff here
end