Buttton Not working

the toolbar works, but not the button.

my script:

local Toolbar = plugin:CreateToolbar("Run a Studio-Script")
local Button = Toolbar:CreateButtton("Studio Script","When clcik the buttton a folder will be inserted to serverscriptservice called StudioScript you put the script you want to execute in that folder, and it will be directly executed in roblox studio, because on script you can do several lines adn even more.","rbxassetid://8852012472")

Button.Click:Connect(function()
	game:GetService("ServerScriptService").LoadStringEnabled = true
	if not game:GetService("ServerScriptService"):FindFirstChild("StudioScript") then
		local StudioScripts = Instance.new("Folder")
		StudioScripts.Name = "StudioScripts"
		StudioScripts.Parent = game:GetService("ServerScriptService")
	end
	game:GetService("ServerScriptService"):FindFirstChild("StudioScript").ChildAdded:Connect(function(Script)
		if not game:GetService("ServerScriptService"):FindFirstChild("StudioScripts"):isA("Folder") then
			game:GetService("ServerScriptService"):FindFirstChild("StudioScripts"):Remove()
			warn("You can not have somethine else in serverscriptservice called StudioScripts!.")
		else
			loadstring(Script.Source)
		end
	end)
end)
1 Like

This is wrong, it should be Button.MouseButton1Click

no!
the button is not even displayed!
thats not even the problem!

For string only(such as JSON/ RAW/ ETC.) = loadstring(httpservice:GetAsync(Link))

With functions
= loadstrinf(httpservice:GetAsync(Link,true)()

that’s not even what i asked for!

Well it seems like your function .Click is normal, but there must be a problem when you run it.

Is it possible that you forgot to save the script as a plugin after you made changes to it?

no i did not forget to publish the pluign.

So does this mean the button is visible but it doesn’t work? I’m confused.

no, the button does not even exsist

Right click on your plugin script, then if your testing your plugin, press Save as Local Plugin if not the Save as Plugin. If you want to include ui for your plugin, parent your script to a folder then right click the folder then press Save as Local Plugin* or Save as Plugin. (you don’t have to test or press F5 to see if your plugin exist, it will just create an error)

Found it! There’s a typo in Button.

Just a tip: in the future, try checking your output for errors as the first thing when something doesn’t work. It will tell you where the error is, and save you the hassle of posting about it.

1 Like

yeah checked the output yesterday or some days ago, it said

CreateButtton is not a valid memer of ToolBar.

but I did not notice the typo anyways

it says LoadStringEnabled is not a valid memer of serverscriptservice.
but… i don’t see any folder. even if The output says that, why the folder is not there?

and if i create a folder called StudioScripts and put a script in it the script does nto remove

This usually means there’s a typo or the child doesn’t exist yet.


That’s because LoadingStringEnabled is a non-scriptable property of ServerScriptService, which means you cannot change or even read it using scripts. The only solution to that is to completely revise your code, sorry.

On the dev hub, it says not accessible by any code, which means not even plugins can access it. You can’t even execute it through the command bar.

1 Like

ok, then why the folder isnt working??

Did you get rid of the code that caused errors? The rest of the script doesn’t run if it throws an error.

https://developer.roblox.com/en-us/api-reference/function/Instance/Remove

You used :Remove() function instead of :Destroy(). According to the forum. The function is already deprecated or you cant use it need anymore

1 Like

but why the folder is not creating even if there is no folder in the serverscriptservice?