Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

I'm trying to make a Tween, but for some reason it doesn't play , can anyone help?

Asked by 4 years ago
01-- LocalScript
02 
03wait(2)
04local door = game.Workspace.Door.Main
05local UIS = game:GetService("UserInputService")
06local tweenService = game:GetService("TweenService")
07local tweenInfo = TweenInfo.new(2,Enum.EasingStyle.Sine,Enum.EasingDirection.In,0,true,0.5)
08local secondDoor = door.Parent.SecondMain
09local secondPosition = {}
10secondPosition.CFrame = door.CFrame
11 
12local doorAnimation = tweenService:Create(door,tweenInfo,secondPosition)
13 
14print("Everything loaded")
15 
View all 22 lines...
0
Tysm I didn't notice it lol NicoXerocious 29 — 4y

1 answer

Log in to vote
1
Answered by
Fifkee 2017 Community Moderator Moderation Voter
4 years ago
Edited 4 years ago

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?

Ad

Answer this question