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

why won't the following code work? Cloning

    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))

5 comments

0

the position isn't working

1

where is the script located?

0

under the part I want cloned

0

Where is the part located?

0

workspace

1 answer

✓ Accepted answer

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)

3 comments

0

Capitalization matters... and spelling, oops

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

0

nice catch

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