Why does this door spin with TweenService?
Asked by
2 years ago Edited 2 years ago
So, my problem is I have a door with a proximityprompt, and a key, when I use a key the door opens, like doors usually do. But the door doesn't just rotate 90 degrees, it rotates a full 360 degrees and then goes to the "storageroomdoorclosed" door. And it's not closing the right way
it's going left 360 degree, when the right way would be: going right and only rotating 90 degree.
01 | local TweenService = game:GetService( "TweenService" ) |
04 | script.Parent.ProximityPrompt.Triggered:Connect( function (Player) |
05 | if Player:WaitForChild( "Backpack" ):FindFirstChild( "Key" ) then |
06 | script.Parent.ProximityPrompt.Enabled = false |
08 | TweenService:Create(script.Parent.Parent.storageroomdoorclosed,TweenInfo.new(Time, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Position = game.Workspace.storageroomdooropen.Position, Orientation = game.Workspace.storageroomdooropen.Orientation } ):Play() |