So when i’m scripting and I have a big model of parts, and I want to make them all move, how would I do that? I’ve tryed making a model and using this script:
game.Workspace.Model.Position = Vector3.new(0, 0, 10)
But it always gives me this error:
Position is not a valid member of “game.Workspace.Model”
I’ve also tryed welding it to one part but never works. Anyway to work around this?
1 Like
You can do something like this:
local parts = game.Workspace.Model:GetChildren()
for i,v in pairs(parts) do
v.Position = Vector3.new(your position)
end
This gets every part’s location and moves it to the selected position
2 Likes
Would this work:
local PlantParts = game.Workspace.OfficePlant:GetChildren()
PlantParts.Position = Vector3.new(my position)
Even if the children were this:
No, the script wouldn’t work. If you want to move the model and it has only 1 part, just set the position of the part.
It has meshes in it too, so would that work?
Anything that has Position value that is a Vector3 would work
Wait
the script with the explorer image also wouldn’t work also because it’s models in models, consider making those just parts or meshes individually
Your solution solved it, thanks!
1 Like
system
(system)
Closed
December 17, 2023, 9:19pm
9
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.