Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Clone after Wait for Child?

Asked by 5 years ago
Edited 5 years ago
wp = game:GetService("Workspace")
HR = wp:WaitForChild("Holder"):Clone()
HR.Parent = script.Parent

The script works but it completely ignores the Clone function, just moving Holder to script.parent, instead of cloning... what can i do to fix that?

1 answer

Log in to vote
1
Answered by
CjayPlyz 643 Moderation Voter
5 years ago
Edited 5 years ago
local Holder = workspace:WaitForChild("Holder"):Clone()
Holder.Parent = script.Parent

If this doesn't work then try this.

local Holder = workspace:WaitForChild("Holder")
local NewHolder = Holder:Clone()
NewHolder.Parent = Holder
0
Only use global variables when needed to, always try to use local variables CjayPlyz 643 — 5y
0
Thanks! Igoralexeymarengobr 365 — 5y
0
np CjayPlyz 643 — 5y
0
CosmicguyTinyWeenous what are you talking about, i don't wan't robucks Igoralexeymarengobr 365 — 5y
Ad

Answer this question