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

Moving models to ReplicatedStorage?

How do you move models from Workspace to ReplicatedStorage? Is it possible? I want to do it using a SurfaceGui TextButton.

function onButtonClicked()
local model = game.Workspace.model:Clone()
model.Parent = replicated
end


script.Parent.MouseButton1Down:connect(onButtonClicked)

I know that's wrong and I'd like to get a correct version.

1 comment

0

Please use a Code block it makes it easier for us to understand the code.

1 answer

Try this

function onButtonClicked() 
local Model = game.Workspace.model:Clone()
Model.Parent = game.ReplicatedStorage 
end

script.Parent.MouseButton1Down:connect(onButtonClicked)

If u want it to disappear from workspace then try this...

function onButtonClicked() 
local Model = game.Workspace:FindFirstChild(“model”)
If Model then
  Model.Parent = game.ReplicatedStorage 
end
end

script.Parent.MouseButton1Down:connect(onButtonClicked)

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