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

Why can't I clone models from server storage?

I've been trying to create a bunch of the same model by copying one I have in ServerStorage.

Script in ServerScriptService works like this:

function CreateModel()
	newModel = game.ServerStorage.Model:clone()
	newModel .Parent = game.Workspace
	newModel .Position = Vector3.new(0,0,2)
end

However, this code does not create the part when it is run, unless it is a basic part. Is there a way to successfully clone models from ServerStorage?

1 comment

0

There is a space before the ".

1 answer

✓ Accepted answer

If this is the whole script you'll need something to call that function like a script.Parent.ClickDetector.MouseClick:connect(onClicked). But you don't need something to activate it.

So, you'll use this:

local Service = game:GetService("ServerStorage")
local newModel = Service.Model

newModel:clone()
newModel.Parent = game.Workspace
newModel.Position = Vector3.new(0,0,2)

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