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

how do i load items on a different baseplate after saving their position?

Asked by 6 years ago

i can save the position of items that the player placed but how can i load them onto a different baseplate with their position being the same on that baseplate?

1 answer

Log in to vote
0
Answered by
mattscy 3725 Moderation Voter Community Moderator
6 years ago

You should get the offset of the part’s position from the baseplate’s position.

To achieve this, you could do something like:

local offset = part.Position - baseplate.Position

to get the offset, and then save this value. When loading you can go:

part.CFrame = CFrame.new(baseplate.Position + offset)

to put the part back into the correct place no matter what baseplate it is loaded from.

0
Ok thanks¬ therealae 7 — 6y
Ad

Answer this question