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

Why is this model not spawning when I press the Plug-In button?

I am making a Plugin that will plant a model into Workspace. I'm placing it into the same script that made the Toolbar button, I just do not understand 2 things that I believe is making this script not work:

  1. It is asking me for the Model Asset ID, I have tried to find the Asset ID to no avail before trying the actual Model ID. The model ID has not worked, but it could be for the other reason.

  2. I'm not sure if I should have Vector3 or workspace in the the second part of the Newmodel line.

local toolbar = plugin:CreateToolbar("6oi's Plugins")
 
local newScriptButton = toolbar:CreateButton("E to Equip", "Made by 6oi", "rbxassetid://3643006060")

newmodel = game:GetService("InsertService"):LoadAsset(???)
newmodel:MoveTo(Vector3.new(0, 0, 0))

Can anyone help me out?

1 answer

✓ Accepted answer

If model is child of script that creates that plugin you can do:

local model = script.Parent:WaitForChild("ModelName")

local clone = model:Clone()
clone.Parent = game.Workspace
clone.CFrame = CFrame.new()-- one way to move it

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