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

Cloning by GUI

This will be the last thing I will need help with for the game I am building. Thank you to whoever helped with the "Remove a Chair by GUI" Topic. On this Script it's supposed to regen the Chairs back when you click on the GUI but there are some errors on the line.

local Model = Workspace.Set.FutureChair

script.Parent.MouseButton1Down:connect(function()
	local ModelCopy = Model:Clone()
	ModelCopy.Parent = Workspace.Set
	wait()
end

2 answers

local Model = Game:GetService("ServerStorage"):FindFirstChild("FutureChair");

script.Parent.MouseButton1Down:connect(function() 
Model:Clone().Parent=Workspace.Set;
end);

Just put your model named FutureChair in ServerStorage.

2 comments

0

Doesn't work.

0

The script provided should work, to my understanding (I didn't personally test it, but I did go over it a few times and didn't see any errors). Are you sure everything is named correctly, and that this is inside of your TextButton/ImageButton/etc?

local model = game:GetService("ReplicatedStorage"):FindFirstChild("FutureChair")

script.Parent.MouseButton1Down:connect(function()
model:clone().Parent = Workspace.Set
end)

Put it inside replicatedstorage. From this, local scripts can access it.

1 comment

0

I put the Chairs into ReplicatedStorage, but it didn't work

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