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

I can't seem to change the Origin Position of a model, anyone know why?

here is the code I used for it:

local part = character:Clone()
part.Parent = viewportFrame
part.["Origin Position"] = Vector3.new(0, 0, 0)

The error I am getting is:

Syntax Error: Expected Identifier, got [

3 comments

0

Origin Position is not accessible by code.

0

Is there any other way I can change its position?

0

I do not understand the scripts of what you're trying to move? Make it NPC Walk? Anyway you see part.["Origin Position"] = Vector3.new(0, 0, 0)? Well change some zeros, try to test it, it might help! You can also help me on my Article please!

1 answer

You can use :MoveTo() which is a method of a model to move the position of a model

local part = character:Clone()
part.Parent = viewportFrame
part:MoveTo(Vector3.new(0, 0, 0))

There isn't really a possible way to access the 'Origin Position' property.

You can also set and move the primarypart which is like the root part of a model.

local part = character:Clone()
part.Parent = viewportFrame
part.PrimaryPart.Position = Vector3.new(0, 0, 0)

And why did you name a var of the model 'part'?

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