-
What do you want to achieve? Keep it simple and clear!
I have been trying to make a simple plugin for my team and I to use for “easier building” that will allow us to easily scatter environment features across the map. It will be used to automate the process of decorating to make decorating easier. -
What is the issue? Include screenshots / videos if possible!
The issue is that I can’t seem to get children in my script and I can’t even parent a UI from a model to it, or using the assets folder. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried looking for solutions, but couldn’t find any, so please link me to a question with an answer that answers my question or answer it yourself!
local ToolBarButton = plugin:CreateToolbar("Environment Tool"):CreateButton("EnvironmentTool", "Click here to get started!", "rbxassetid://4850193445")
local Toggle = false
local WidgetInfo = DockWidgetPluginGuiInfo.new(
Enum.InitialDockState.Left, -- Widget will be initialized in floating panel
false, -- Widget will be initially enabled
false, -- Don't override the previous enabled state
125, -- Default width of the floating window
175, -- Default height of the floating window
125, -- Minimum width of the floating window (optional)
175 -- Minimum height of the floating window (optional)
)
local UI = plugin:CreateDockWidgetPluginGui("PluginUI", WidgetInfo)
UI.Title = "Environment Tool"
local PluginUI = require("rbxassetid://4850530077")
PluginUI.Parent = UI
function ToggleButton()
ToolBarButton:SetActive(not Toggle)
UI.Enabled = not Toggle
Toggle = not Toggle
end
function StartSelection()
local Cursor = Instance.new("Part")
Cursor.Color =
plugin:Activate(true)
local Mouse = plugin:GetMouse()
end
function StopSelection()
end
function UpdateSelection()
end
function PlaceModels(Models)
end
CreateUI()
ToolBarButton.Click:Connect(Toggle)
It is all in one script that creates a dockwidgetplugingui and then parents a model’s UI contents to it.