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

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

Asked by 2 years ago
Edited 2 years ago

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 [

0
Origin Position is not accessible by code. luluziluplayzROBLOX 61 — 2y
0
Is there any other way I can change its position? Noahbb22 2 — 2y
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! roblox8881215 17 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

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'?

Ad

Answer this question