Funnily enough the button works, but it seems like it tried to create the button twice???
Why did you do:
local plugin: Plugin = plugin
and…
local btn: PluginToolbarButton = toolbar:CreateButton("test", "h", "rbxassetid://19419721", "the")
Lua U type checking, plugin isn’t defined by default so I used it to get the functions to show up
Seems like the only way I can find is use
game:GetService("HttpService"):GenerateGUID()
as the buttonId (first argument of CreateButton) of the button, otherwise it refuses to work for whatever weird reasons, if I use the GUID as the id, it will no longer error and it shouldn’t break any scripts ( i think )
How would I implement that into my script?
nevermind it will mess up the name
and it actually creates 2 buttons instead of 1 for whatever reason
oh, so that’s the cause
as comes out when you save the plugin it will make the script run in the old location with plugin permissions, doing this
I don’t really know what that means lol. Could you explain a little more?
I added
print(script, script.Parent)
in the script, and when I saved it as a Local Plugin it ran the script in the old folder (example is it’s name) and the new location (rbxmx file)
What do you mean by “the old folder”?
Hold on, did you just press Close File and then opened a new Baseplate? By restarting I meant closing studio & opening it
I closed and reopened studio, why?
The wording in there was as if you simply closed the baseplate (closed the file), sorry my bad
Do you think you know a solution to this issue?
The only thing I can think of is use GUID as the id, but that’d still create 2 buttons which would be not what we need
oh wait… i messed up. You actually need to save the folder unlike we did, which doubled the scripts (the example folder has the script, and the “local” (accidentally named it that way) script was gonna run too)
And that fixed it! Thank you, I’ll mark one of your replies as the solution.
EDIT: I’m too lazy to find the right reply to mark as the solution, I have also ran out of likes for today, so that’s cool.