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

[Fixed] When clicked this script is suppose to clone a union but it won't work, how do I fix this?

This part when clicked is suppose to duplicate a scripted union but it won't duplicate.

local ClickButton = script.Parent("ClickPart")
local Click = ClickButton:WaitForChild("Click")
 
Click.MouseClick:Connect(function(player) 
	wait(0.5)
	workspace.DNA_Manipulator:Clone()
end)

3 comments

0

Save the clone as a variable and parent it to the workspace

0

local clone = workspace.DNA_Manipulator:Clone(); clone.Parent = workspace

0

this also helped

1 answer

✓ Accepted answer

You need to parent the clone to the workspace, that's why it isn't showing up. If you don't give the clone a parent, the parent will just be nil

local ClickButton = script.Parent("ClickPart")
local Click = ClickButton:WaitForChild("Click")

Click.MouseClick:Connect(function(player) 
    wait(0.5)
    local lol = workspace.DNA_Manipulator:Clone()
    lol.Parent = workspace -- Set the parent to workspace
end)

Hope this helps!

1 comment

0

ty

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