Struggling with relative position/Cframe on model

So I am trying to get relative position/Cframe of a button-model on a templateplot-model and setting another button/cloned button-model on another plot-model

But I’m getting this error

TOWorldSpace is not a valid member of Model "Workspace.Plots.Plot"

Snippet of the script

local templatebutton = Workspace.TemplatePlot.Buttons
					local templateitems = Workspace.TemplatePlot.Items
					
					--Spawn check if the plots is owned
					--Check IF the plot has been claimed
					if plot:GetAttribute("Taken") == true then
						--Create a loop FOR the "buttons" in templatebutton
						for i, v in pairs(templatebutton:GetChildren()) do
							--Clone the buttons and parent it to plot.buttons
							local plotbutton = v:Clone()
							plotbutton.Parent = plot.Buttons
							
							--Get relative position of the buttons on the templateplot and set it on the plot
							local relativeposition = templateplot.PlotFloor.CFrame:ToObjectSpace(v:GetPivot())
							v:PivotTo(plot:ToWorldSpace(relativeposition))
							
						end
						
					end

Btw the plot model consist of plotdoor and plotfloor part

plot is not a cframe

IIIIIIIIIIIIIIIIIIIIIIIII

Yes ik that. It’s pivot right?

you should change it to plot:GetPivot()

Yes I know that, it’s in the snippet above

?no it isnt

image

Oh you meant their. Ok I will try it right now

It worked, thank you very much

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.