Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isn't my plugin button showing up?

Asked by 9 years ago

I made a plugin where it creates a gui to create a decal inside of a brick by putting in information on where the decal is, where it faces and it's texture. But it won't show up after I installed it, I restarted studio and all that... It's just not showing up, is there anything wrong with it?

This is in a normal script. (I remember making another plugin on another computer, it's fine to have local inside of it)

local plugin = PluginManager():CreatePlugin()
local toolbar = plugin:CreateToolbar("Doiteain's Plugins")
local button = toolbar:CreateButton(
    "Create Decal",
    "Create a decal by putting in the information of a decal.",
    "pluginicon.png"
)
local rbxgui = game.CoreGui

local gui = Instance.new("ScreenGui", rbxgui)

local frame = Instance.new("Frame", gui)

frame.Size = Vector3.new(0, 200, 0, 400)
frame.BackgroundTransparency = 0.5
frame.BackgroundColor3 = Color3.new(0,0,0)
frame.Position = UDim2.new(0, 5, 0, -500)

local dId = Instance.new("TextBox", frame)
dId.Size = Vector3.new(0, 190, 0, 50)
dId.Position = UDim2.new(0, 5, 0, 5)
dId.BorderSizePixel = 0
dId.TextScaled = true
dId.Text = "Type the id of the decal here"

local dhint = Instance.new("TextLabel", dId)
dhint.Size = Vector3.new(0, 190, 0, 50)
dhint.Position = UDim2.new(0, 0, 0, 40)
dhint.BackgroundTransparency = 1
dhint.Text = "Make sure you subtract 1 from the id, if that doesn't work, try it again"
dhint.TextWrapped = true
dhint.TextColor3 = Color3.new(255, 0, 0)

local enter = Instance.new("TextButton", dId)
enter.Size = (0, 190, 0, 50)
enter.Position = UDim2.new(0, 0, 0, 335)
enter.Text = "Enter"
enter.BorderSizePixel = 0
enter.TextScaled = true

local pselect = Instance.new("TextBox", frame)
pselect.Size = Vector3.new(0,190,0,50)
pselect.Position = UDim2.new(0,5,0,100)
pselect.TextScaled = true
pselect.TextWrapped = true
pselect.Text = "Type the location of the brick you want the decal in"
pselect.BorderSizePixel = 0

local pshint = Instance.new("TextLabel", pselect)
pshint.Size = Vector3.new(0, 190, 0, 50)
pshint.Position = UDim2.new(0, 0, 0, 40)
pshint.BackgroundTransparency = 1
pshint.Text = "For example: Workspace.Part"
pshint.TextWrapped = true
pshint.TextColor3 = Color3.new(255, 0, 0)

local dpos = Instance.new("TextBox", frame)
dpos.Size = Vector3.new(0, 190, 0, 50)
dpos.Position = UDim2.new(0, 5, 0, 195)
dpos.BorderSizePixel = 0
dpos.TextScaled = true
dpos.Text = "Type where the decal is going to face on the part"

local dphint = Instance.new("TextLabel", dpos)
pshint.Size = Vector3.new(0, 190, 0, 50)
pshint.Position = UDim2.new(0, 0, 0, 45)
pshint.BackgroundTransparency = 1
pshint.Text = "Back, Bottom, Front, Left, Right, Top are examples, make sure they are capital!"
pshint.TextWrapped = true
pshint.TextColor3 = Color3.new(255, 0, 0)

button.Click:connect(function()
    frame.Position = UDim2.new(0, 5, 0, 5)
end)
local id = dId.Text
local selection = pselect.Text
local position = dpos.Text
local newdecal = Instance.new("Decal")
enter.MouseButton1Click:connect(function()
    newdecal.Texture = "" ..id
    newdecal.Parent = "" ..selection
    newdecal.Face = "" ..position
end)

Answer this question