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
1 | Part:clone().CFrame = CFrame.new( 111.2 , 16.1 , 86.9 ) |
and
1 | Part:clone().CFrame = Vector 3. 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?
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.
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
1 | local p = Part:Clone() |
2 |
3 | p.CFrame = CFrame.new( 111.2 , 16.1 , 86.9 ) |
4 | p.Parent = workspace |