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

How do I move all the parts inside a model?

Asked by 4 years ago

Instead of moving all the parts of the model one by one, is there a better way to do it?

1
SetPrimaryPartCFrame is the function that you might be looking for. ScuffedAI 435 — 4y
0
By the way to add on to what @Kate_Ai said, to use it reference the objects and do the following: Object:SetPrimaryPartCFrame(CFrame.new(0,0,0)) That would set the part to 0,0,0. I recommend setting a invisible part centered in the model or else you will have a weird offset. BlackOrange3343 2676 — 4y

1 answer

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

Issues with your post.

You did not show any attempt at trying to move the model itself. Please try to show some type of effort please.

What to look into.

Ways to learn more about model moving. Model MoveTo | Model Primary Parts. | Model

What I did.

Alright so I used a RemoteEvent, a GUI Button, Part Primary & MoveTo:

Script that moves the part when the event is called.

--Made by MillerrIAm
----------------Variables-------------
Model = game.Workspace.Parts
RemoteEvent = game.ReplicatedStorage.MovingModelRemote
---------------Main Script--------------
RemoteEvent.OnServerEvent:Connect(function(Player,Position)
    if Position == "SetOne" then
        Model:MoveTo(Vector3.new(-35, 0.5, -27.4))
    elseif Position == "SetTwo" then
        Model:MoveTo(Vector3.new(-35, 0.5, -42.8))
    end
end)

GUI Button that calls the event.

--Made by MillerrIAm
----------------Variables-------------
RemoteEvent = game.ReplicatedStorage.MovingModelRemote
---------------Main Script--------------
script.Parent.MouseButton1Click:Connect(function()
    RemoteEvent:FireServer("SetOne")
end) 
1
Thanks zandefear4 90 — 4y
Ad

Answer this question