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

Help with the :Clone command it's not working?

I need help with the :clone part in my code on line 12. I have tried it and it didn't work. Is it part of the clicking part or the :clone part exactly?

Here is the code:

local ClickDetector = script.Parent.ClickDetector

ClickDetector.MouseHoverEnter:Connect(function()
	game.Workspace.PlantExample.Position = script.Parent.Position
end)

ClickDetector.MouseHoverLeave:Connect(function()
	game.Workspace.PlantExample.Position = game.Workspace.PlantExampleStay.Position
end)

ClickDetector.MouseClick:Connect(function()
	game.Workspace.PlantExample:Clone()
end)

Anyone?

1 comment

0

Could we prehaps get the error?

1 answer

✓ Accepted answer

You have to set the parent, like:

game.Workspace.PlantExample:Clone().Parent = game.Workspace

1 comment

0

Be sure to mark it as the answer if this answered your question.

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