01 | -- LocalScript |
02 |
03 | wait( 2 ) |
04 | local door = game.Workspace.Door.Main |
05 | local UIS = game:GetService( "UserInputService" ) |
06 | local tweenService = game:GetService( "TweenService" ) |
07 | local tweenInfo = TweenInfo.new( 2 ,Enum.EasingStyle.Sine,Enum.EasingDirection.In, 0 , true , 0.5 ) |
08 | local secondDoor = door.Parent.SecondMain |
09 | local secondPosition = { } |
10 | secondPosition.CFrame = door.CFrame |
11 |
12 | local doorAnimation = tweenService:Create(door,tweenInfo,secondPosition) |
13 |
14 | print ( "Everything loaded" ) |
15 |
You set "secondPosition.CFrame" to the door's initial CFrame, meaning that it doesn't move at all. The tween does infact play, but not how you want it. Did you possibly mean secondDoor.CFrame
, perhaps?