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

How Do you make a plugin that inserts your model?

Asked by 3 years ago
Edited 3 years ago

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)

1 answer

Log in to vote
0
Answered by 2 years ago

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)

Ad

Answer this question