How To Make Tween Service For Model With Primary Part Please ?
I have test with :SetPrimaryPartCFrame but doesn't work
My code is :
-- door 1 and door 2 are on the same model --
open = script.Parent.Parent.Parent.open
lock = script.Parent.Parent.Parent.lock
open.Value = false
door1 = script.Parent.Parent.Parent.Parent.Door1
door2 = script.Parent.Parent.Parent.Parent.Door2
local TweenService = game:GetService("TweenService")
local part = script.Parent
local tweenInfo = TweenInfo.new(1.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0)
local Door1Open = {CFrame = door1.CFrame + door1.CFrame:vectorToWorldSpace(Vector3.new(0,0,-8))}
local Door2Open = {CFrame = door2.CFrame + door2.CFrame:vectorToWorldSpace(Vector3.new(0,0,-8))}
local Door1Close = {CFrame = door1.CFrame }
local Door2Close = {CFrame = door2.CFrame }
local Open1 = TweenService:Create(door1,tweenInfo,Door1Open)
local Open2 = TweenService:Create(door2,tweenInfo,Door2Open)
local Close1 = TweenService:Create(door1,tweenInfo,Door1Close)
local Close2 = TweenService:Create(door2,tweenInfo,Door2Close)
script.Parent.MouseClick:connect(function()
if open.Value == false and lock.Value == false then
script.Parent.Parent.Parent.Button1.BrickColor = BrickColor.new("Lime green")
script.Parent.Parent.Parent.Button2.BrickColor = BrickColor.new("Lime green")
Open1:Play()
Open2:Play()
open.Value = true
elseif open.Value == true and lock.Value == false then
script.Parent.Parent.Parent.Button1.BrickColor = BrickColor.new("Really red")
script.Parent.Parent.Parent.Button2.BrickColor = BrickColor.new("Really red")
Close1:Play()
Close2:Play()
open.Value = false
elseif open.Value == true and lock.Value == true then
script.Parent.Parent.Parent.Button1.BrickColor = BrickColor.new("Really red")
script.Parent.Parent.Parent.Button2.BrickColor = BrickColor.new("Really red")
Close1:Play()
Close2:Play()
open.Value = false
end
end)

4 comments
If you use tweenservice you should better just union everything
yes but union don't work with window transparency
Why would you move a window??
no window door with window