I have a plugin But I don't know how to make it insert a model please help. I already have
local toolbar = plugin:CreateToolbar("Create Houser") local button = toolbar:CreateButton("Create a House", "Creates a house.", " ") local history = game:GetService("ChangeHistoryService") local function createPart() --- what do i put here? history:SetWaypoint("Creatded house") end button.Click:Connect(createPart)
I found an answer my self you have to use InsertService
as shown down below.
local toolbar = plugin:CreateToolbar("Custom Cursor") local button = toolbar:CreateButton("Create your own cursor", "Helps you out with the custom cursor! it is in starter gui", "144810336 ") local history = game:GetService("ChangeHistoryService") local function createPart() game:GetService("InsertService"):LoadAsset(5746707037).Parent = game.StarterGui local Gui = game.StarterGui.Model:children() wait(3) Gui = game.StarterGui game.StarterGui.Model.Name = "UNGROUP ME" history:SetWaypoint("Created New Part") end button.Click:Connect(createPart)