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

How do I use CFrame to teleport a part to another part?

Asked by 4 years ago

I'm trying to clone a mag and have it move to the part. The script works but I keep getting an error.

I have:

Mag.CFrame = CFrame.new(Handle:WaitForChild("Magazine").CFrame)

The error I'm getting:

Players.LeedleLeeRocket.Backpack.M9.Server:183: invalid argument #3 (CFrame expected, got Vector3)

I tried swapping CFrame and Vector3 in various ways but I keep getting an error no matter what I do. How do I use CFrame properly?

1 answer

Log in to vote
1
Answered by 4 years ago

Remove the CFrame.new(). This is just declaring a new CFrame, when one already exists that you're bringing the Mag to.

Ad

Answer this question