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

When should you use vector3 instead of CFrame ?

Asked by 4 years ago

I don't understand how they're different I heard that vector3 u can't place when there's already a part at the position but I tried it and I did become able to place a part inside a part in. a position. So when is it advised to use Vector3 over CFRAme and Cframe over vector3

2 answers

Log in to vote
1
Answered by 4 years ago

Well Stack edit isnt working rn btw

Vector3 is just positioning along X,Y,Z Axis

CFrame is capable of positioning in a similar way to Vector3 but with rotation

When u want to position something relative to the workspace use vector3

when you want to position something relative to an objects position Use CFrame

^ for ex like if i wanted an object above my head I'd do

part.CFrame = game.Players.LocalPlayer.Character.Head.CFrame * CFrame.new(0,3,0)

0
I hope they removed Stackedit. I don't like it. Sonnenroboter 336 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

I would Always use CFrame because it's with rotation. That means that CFrame is basicly the better Vector3.

0
Wrong DeceptiveCaster 3761 — 4y

Answer this question