Help with Furniture Placement

  1. What do you want to achieve? In my game we have furniture placement. You can purchase an apartment, place your furniture, and then load it into any apartment you want with everything in its correct spot relative to the canvases position.

  2. What is the issue? The problem I’m having is the furniture is not positioning relative to the canvases position. When a player saves their furniture data, it saves the positions x, positions y, positions z, rotation, and normal id. However when they try to load their apartment, it loads into coords and not relative to the canvas position.

  3. What solutions have you tried so far? I have tried setting the cframe to the canvases cframe and multiplaying it by the coordinates.

if FindFurn then
    local Pos =["Pos"]["X"], V["Pos"]["Y"], V["Pos"]["Z"])
	FindFurn:SetPrimaryPartCFrame(, Pos + Dist) * CFrame.Angles(0, 0, math.rad(V["Rotation"])))

Heres an example of what I want to achieve. (I suck at explaining, hopefully this helps)
As you can see, even with the part it’s on being rotated differently and in a different place, it’s still in its relative position. This is what I want to achieve.

Kon’nichiwa! :bowing_woman:t2:

local BasePart = workspace.YourBasePart
local YourModel = workspace.YourModel
local ModelCFrame = YourModel:GetPivot()

--This gets the cframe offset of the model relative to the basepart. This is the information I think you want to save.
local Saved_Relative_CFrame = BasePart.CFrame:toObjectSpace(ModelCFrame) 

--You can save the Saved_Relative_CFrame info however your like.
--Once you need it or load it, you can apply it to the model by doing the following:
YourModel:PivotTo(BasePart.CFrame * Saved_Relative_CFrame)

I explained in the code snippet but if you need further explanation just reply and let me know.

Here is some resource:
CFRAMES or [CFRAMES new documentation]
:GetPivot() or [GetPivot new documentation]
:PivotTo() or [PivotTo new documentation]


Thanks so much! :grinning:

This worked perfectly and you explained it well.

1 Like