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

why won't the following code work? Cloning

Asked by 6 years ago
    local original = script.Parent
    local copy = original:Clone()
    copy.Parent = original.Parent
    copy.tranparency = 0
    copy.CanCollide = true
    copy.position(Vector3.new(130, 8.5, -15.75))
0
the position isn't working PaliKai13 92 — 6y
1
where is the script located? bossay6 62 — 6y
0
under the part I want cloned PaliKai13 92 — 6y
0
Where is the part located? GoodCallMrOlsen 70 — 6y
0
workspace PaliKai13 92 — 6y

1 answer

Log in to vote
1
Answered by
bossay6 62
6 years ago

Try this

local original = script.Parent
local copy = original:Clone()
copy.Parent = original.Parent
copy.Transparency = 0
copy.CanCollide = true
copy.Position = Vector3.new(130, 8.5, -15.75)
0
Capitalization matters... and spelling, oops PaliKai13 92 — 6y
1
Always set the parent last - it's an efficiency thing. Article: https://devforum.roblox.com/t/psa-dont-use-instance-new-with-parent-argument/30296 SummerEquinox 643 — 6y
0
nice catch bossay6 62 — 6y
Ad

Answer this question