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

How do I change something's CFrame?

Asked by 6 years ago
Edited 6 years ago
script.Parent.Parent.CFrame = -5.46991014, 4.28009176, -13.5900183, 0.000226000004, 4.29999964e-05, 1, -1, 9.71799974e-09, 0.000226000004, 0, -1, 4.3e-05

I never really understood Vector3 or CFrame. The part is a union.

It prints this error when ran: https://gyazo.com/405bed976368e1b6487179c233d5a5ff

0
This question only makes it look like you don't understand the most basic coding concepts so I recommend you learn basic Lua. cabbler 1942 — 6y
0

2 answers

Log in to vote
0
Answered by
GingeyLol 338 Moderation Voter
6 years ago
Edited 6 years ago
--script's parent is union or part
--script.Parent.CFrame = CFrame.new(X,Y,Z)
script.Parent.CFrame = CFrame.new(5,5,5) --example 
Ad
Log in to vote
-1
Answered by 6 years ago

If it is a part you can use

script.Parent.Parent:SetPrimaryPartCFrame()

then carry on with the script

Answer this question