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

How do I change the position and orientation of a model in a script?

I have a model that I'm trying to use as an ability, but since it's a model, I can't change its position or orientation. I tried using a in pairs loop, and using cframe and cframe angles, but that creates a problem because it would mess up how I want the model to look. Is there anything to solve this problem? Thanks!

2 answers

Use something like this:

local model = game.Workspace.model:GetDescendants
model.Position = model.Position + Vector3.new(0,5,0)

5 comments

0

I have actually not tried this in studio before but it should work.

0

To change the orientation, use CFrame.Angles()

0

Didn't work. I tried to equal the position to the humanoid position, but it didn't change the position.

0

You can't set "model"s position because it's an array of multiple instances

0

Sorry, I'm an idiot. I forgot all about primary parts. Set a primary part in the model and then move the primary part.

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