How to DO Set PrimaryPart Tween?

Forgive me, I forgot how to do this CFraming. Looked CFrame API… I forgot.

local RepS = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")

local info = TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)

local ModuleFolder = RepS:FindFirstChild("Modules")
local Zone = require(ModuleFolder:FindFirstChild("Zone"))

local ModelDoor = script.Parent

local function doorfunction(model)
	local DoorLeft = model.DoorL
	local DoorRight = model.DoorR
	local ToLeft = model.ToLeft
	local ToRight = model.ToRight
	local touchpart = model.DoorTouch
	
	local debounce = false
	
	local platform = Zone.new(touchpart)
	platform.playerEntered:Connect(function(player)
		if debounce == false then
			debounce = true
			DoorLeft:SetPrimaryPartCFrame(DoorLeft:GetPrimaryPartCFrame() = ToLeft.CFrame)
			debounce =false
		end
	end)
	
	platform.playerExited:Connect(function(player)
		if debounce == false then
			debounce = true
			
			debounce=false
		end
	end)
end

doorfunction(ModelDoor)

Do you want to do this with tweens or changing cframes?

I’m putting hold on tween, I want to change cframe

Ok, what I would do is DoorLeft.PrimaryPart.CFrame = ToLeft.CFrame
Remove the SetPrimaryPartCFrame

If you want to use SetPrimaryPartCFrame you put ToLeft.CFrame in the parenthesis and remove the rest inside

Checked/tested it. It’s not working

https://gyazo.com/b76901c2c080333ffc9ab361ff01ff0b

https://gyazo.com/b76901c2c080333ffc9ab361ff01ff0b

it’s not workin

Is the touched event firing? Try adding a print inside to see if that is the problem.

Yes it is. Added print to test it out and it did printed but door aren’t functional

Try to do it without the debounce to see if the debounce is the problem

https://gyazo.com/3c258b21aebfebc8d137aae5040819e6

Are you trying to move the whole door or just one side?

I am trying to move one door side to left. That’s it.

So, there are no welds or anything binding or holding the left door in place?

Nope. There’s nothing weld or binding. I should unanchor it? but… it will fall?

What is “ToLeft” are you sure the CFrame is in the correct position? If that isn’t the issue could you send a small file with just the door and model you’re working with? Would be much easier to debug.

Ze_tsu is right but do not unAnchor the door that will lead to more problems.

Yes, I’m pretty sure it is correct position. I’ll send you files wait… how I do sen- nvm hold on
LabDoor.rbxl (99.4 KB)

In order to Interpolate the Model, you either need to weld the model together, unachored all except the PrimaryPart, and Tween the PrimaryPart only, or grab the Position/Orientation of the Model, Interpolate them towards the Target, and Manually apply the new Model Position /Orientation.

GetPrimaryPartCFrame will grab the Models Current CFrame, SetPrimaryPartCFrame will apply the CFrame, TweenService only accepts Property changes, which for the Models CFrame as a property, you cannot access when scripting.

Plus, these functions are also Deprectated.