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

How do I place a copied brick?

i have been trying to make so when a part touches another part, it will run a if statement if the parts name is correct, and clone the part with the right name. But I don't know how to place the copied part, i have tried

Part:clone().CFrame = CFrame.new(111.2, 16.1, 86.9)

and

Part:clone().CFrame = Vector3.new(111.2, 16.1, 86.9)

but the part always gets placed on the exact same place as the part it gets copied from, anyone know how to fix?

1 answer

Your problem

You're using a Vector3 datatype to set the CFrame property. The CFrame property takes a CFrame datatype!

Remember to parent the cloned part as well.


How to Fix

The best way to solve your problem would be assigning a variable to the cloned part, then you can edit it properties from the variable.

Set the CFrame property to a CFrame value

Parent the cloned part


Code

local p = Part:Clone()

p.CFrame = CFrame.new(111.2,16.1,86.9)
p.Parent = workspace

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