I can’t resist but ask, are these the same things?
local part = game.Workspace.Part
part.CFrame *= CFrame.new(0, 0, 100)
and
local part = game.Workspace.Part
part.CFrame += Vector3.new(0, 0, 100)
Are they the same thing? Thanks!
I can’t resist but ask, are these the same things?
local part = game.Workspace.Part
part.CFrame *= CFrame.new(0, 0, 100)
and
local part = game.Workspace.Part
part.CFrame += Vector3.new(0, 0, 100)
Are they the same thing? Thanks!
Wouldn’t the 2nd one error since you’re adding a Vector3 to a CFrame? Although I’m not sure, but if it was
local part = game.Workspace.Part
part.Position += Vector3.new(0, 0, 100)
then they’d be the same. since in the first one you’re multiplying a CFrame which is basically adding a Vector3.
Someone correct me if you can do the 2nd one like that, or perhaps you could see since it would be a relatively easy thing to do
Well I got a correction to my misunderstanding but I didn’t expect it to be that blunt
You can try it for yourself & print the results, it should be the same result? I also believe there is a API Reference for this:
Please don’t post on the devforum if you are not sure about an answer. API documentation clearly says that you can add a Vector3 to CFrame: CFrame | Roblox Creator Documentation.
Not the same thing. Method 1 will offset the part relative to its orientation, whereas Method 2 will translate the part relative to the world (orientation isn’t taken into account).
From the wiki:
https://developer.roblox.com/en-us/api-reference/datatype/CFrame