Still have questions? Join our Discord server and get real time help.
1

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

TtuNkK 37
2 months ago

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!

0

Use something like this:

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

0
I have actually not tried this in studio before but it should work. BRO_ITmeYO 106 — 2mo
0
To change the orientation, use CFrame.Angles() Dovydas1118 856 — 2mo
0
Didn't work. I tried to equal the position to the humanoid position, but it didn't change the position. TtuNkK 37 — 2mo
0
You can't set "model"s position because it's an array of multiple instances BRO_ITmeYO 106 — 2mo
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. BRO_ITmeYO 106 — 2mo
Use Model:SetPrimaryPartCFrame()