Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Which causes less lag: TranslateBy or CFrame.new?

I need to make some moving doors, they can't be local because everyone needs to see them opening. Which method causes less lag? The door I want to move is an union, I could use CFrame to move it or group it into a model and use TranslateBy so the problem lies in which is best performance wise.

2 answers

If you're not doing it locally, both will have a similar effect - The latency will ruin any performance gains. If you're not sure, TranslateBy will be suitable.

2 comments

0

Is there another way then? how can I keep a nice latency level while being able to use moving parts/models without them being local?

0

You can't.

CFrame.new is better as the Vector3 Position (used by TranslateBy) can do translation, not to mention that the position is easier to find with a CFrame than with a vector. Also, Vector3 values also used built-in collision detection, while CFrames don't require that.

This discussion is preserved as it was. New answers, comments, and votes are closed.