Then, the angles and positions of these saved parts are all changed and installed according to the properties of the area.
Yes. I want to create these features. I’m familiar with the datastore features, but I have no idea how to relocate the parts to the properties of the zone. Help!
When you say “installed according to the properties of the area” are you implying the rotation of the grey part, what properties are you looking for?
I’d probably just weld all the parts in-place on the grey part, rotate/move the grey part (moving everything with it) then unweld everything once placed.
Hi . Let me break the steps down for you .
1)Get a pivot point for each plot(top left corner maybe???)
2)when saving the object in the plot, do not save the world position. Instead take the position of the object subtract my the position of the pivot point
3)when loading, take the position of the pivot point + the offset( aka the value on step 2)
there majik . But if your plot have diffent rotation, you can do the same but instead of position, it should be orientation
You could use ToObjectSpace(Current zone the parts are on’s CFrame) to get the position of each part relative to a zone, then you could simply multiply the CFrame of the zone you want to move the part to by the CFrame that you got from using ToObjectSpace and it should work correctly.
For example, let’s say I’m trying to move part B from part A to part C. I could use this:
local A = workspace.A
local B = workspace.B
local C = workspace.C
B.CFrame = C.CFrame * B.CFrame:ToObjectSpace(A.CFrame)