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

Roblox Plugin Issue? Its my first time making a Plugin.

Hello! So i am new to making Plugins. In fact I've just started. I've read through the Roblox Wiki page. I am trying to make a simple plugin when you click it it shows a frame. This script keeps giving me errors. Could anyone help? Thanks in advance. Code is below.

print("Loading Core Processes")
 
-- Check if user has loaded plugin before
local hasLoaded = plugin:GetSetting("pluginHasLoaded")
if not hasLoaded then
	print("Welcome Plugin is now Loading")
	plugin:SetSetting("pluginHasLoaded", true)
end
 

local toolbar = plugin:CreateToolbar("Us3r's Plugins")
 

local button = toolbar:CreateButton(
	"Button",
	"Press me",
	"http://www.roblox.com/asset/?id=145723965"
)
button.Click:connect(function()
	print("Plugin is now active")
	plugin:Activate(true) 
end)
 
local GUI = Instance.new("ScreenGui")
GUI.Parent = game.CoreGui
local frame = game.CoreGui.GUI
frame.Name = MainFrame
frame.Size = ({0, 129}{0, 194})
frame.Position = {0.421, 0},{0.256, 0}



 
print("Finished Loading Shop Plugin Test")

Error ***Expected ')' (to close '(' at column 14), got '(' ***

2 comments

0

lines 28 and 29 are not valid syntax. what you want is UDim2.new(0, 129, 0, 194) and UDim2.new(0.421, 0, 0.256, 0)

0

If variable 'frame' is supposed to be a Frame then that entire part is wrong.

1 answer

You forgot to create the Frame and add UDim2.new, frame.Parent = GUI

print("Loading Core Processes")

-- Check if user has loaded plugin before
local hasLoaded = plugin:GetSetting("pluginHasLoaded")
if not hasLoaded then
    print("Welcome Plugin is now Loading")
    plugin:SetSetting("pluginHasLoaded", true)
end


local toolbar = plugin:CreateToolbar("Us3r's Plugins")


local button = toolbar:CreateButton(
    "Button",
    "Press me",
    "http://www.roblox.com/asset/?id=145723965"
)
button.Click:connect(function()
    print("Plugin is now active")
    plugin:Activate(true) 
end)

local GUI = Instance.new("ScreenGui")
GUI.Parent = game.CoreGui

local frame = Instance.new("Frame")

frame.Name = "MainFrame"
frame.Size =  UDim2.new(0, 129,0, 194)
frame.Position =  UDim2.new(0.421, 0,0.256, 0)

--frame.Parent = game.CoreGui.GUI -- Parenting it to GUI?
-- you can it this way
frame.Parent = GUI



print("Finished Loading Shop Plugin Test")


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