✓ Accepted answer
You're not parenting your object anywhere after it's cloned. As mentioned on the wiki, cloned objects will not be automatically parented to a location. You must parent them manually after getting a reference to the cloned object.
You're also not doing anything on line 4 by saying box:Clone(). That's just copying the object every time the function executes, parenting it to nil immediately.
You're also saying mouseClick instead of MouseClick. Lua is case-sensitive, and sees both of those indices as different representations.
Solution
Simply just create a variable for your cloned object, and parent it:
local box = game.ReplicatedStorage.Box
script.Parent.ClickDetector.MouseClick:connect(function()
local boxClone = box:Clone()
boxClone.Parent = workspace
end)
Let me know if you have any questions.
1 comment
This should have an error.