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

Quick simple question - awaiting simple answer?

Asked by
14dark14 167
4 years ago

why did this work

local part = game.ReplicatedFirst.Part:Clone()
part.Parent = game.Workspace

but this didn't?

local part = game.ReplicatedFirst.Part:Clone(game.Workspace)

2 answers

Log in to vote
1
Answered by
JesseSong 3916 Moderation Voter Community Moderator
4 years ago

That's because you didn't tell the script where to clone it like the parent. In order for it to work you must say the parent of it like

local part = game.ReplicatedFirst.Part:Clone().Parent = game.Workspace

Ad
Log in to vote
2
Answered by 4 years ago
Edited 4 years ago

Clone does not take any arguments so the second script would simply clone it then leave its parent as nil

Answer this question