Door won't play it's animation when activated?
I am working on a door that plays an opening animation when you scan your finger print with a proximity prompt. The door animation won't play but there is nothing in the output. This is a normal script inside the door model. Please help, thanks!
01 | local DoorModel = script.Parent.Door |
02 | local FingerScan = script.Parent.FingerScanner.Scan.ProximityPrompt |
03 | local activated = false |
04 | local TweenService = game:GetService( "TweenService" ) |
06 | local tweeninfo = TweenInfo.new( |
07 | DoorModel.Speed.Value, |
08 | Enum.EasingStyle.Quart, |
09 | Enum.EasingDirection.Out, |
15 | local function open(OtherPart) |
16 | local Player = game.Players:FindFirstChild(OtherPart.Parent.Name) |
17 | if Player and not activated then |
21 | local TweenDoor = TweenService:Create(DoorModel.Main, tweeninfo, { Position = DoorModel.Target 3. Position } ) |
22 | local TweenDoor 1 = TweenService:Create(DoorModel.Main, tweeninfo, { Position = DoorModel.Target 1. Position } ) |
23 | local TweenDoor 2 = TweenService:Create(DoorModel.Main, tweeninfo, { Position = DoorModel.Target 2. Position } ) |
28 | TweenDoor.Completed:Wait() |
34 | TweenDoor.Completed:Wait() |
41 | FingerScan.Triggered:Connect(open) |