-
What do you want to achieve? I want to achieve faster tweening with my door
-
What is the issue? Door opens/closes not fast enough, video is here
-
What solutions have you tried so far? I have looked at easing styles, searched a million topics, but nothing is what I needed.
To make it clear how it has to be like, you can find a YouTube video here
My current code is this:
local TweenService = game:GetService("TweenService")
local opened = false
local door = workspace.DoorTesting
local doorRoot = door.PrimaryPart
local sound = door.Interactive.CupboardSound
local DoorSwingInfo = TweenInfo.new(1)
local DoorSwingTweenOpen = TweenService:Create(doorRoot, DoorSwingInfo, {
CFrame = doorRoot.CFrame * CFrame.Angles(0, math.rad(-90), 0)
})
local DoorSwingTweenClose = TweenService:Create(doorRoot, DoorSwingInfo, {
CFrame = doorRoot.CFrame * CFrame.Angles(0, math.rad(0), 0)
})
door.Interactive.ClickDetector.MouseClick:Connect(function()
if opened == false then
sound:Play()
DoorSwingTweenOpen:Play()
opened = true
else
sound:Play()
DoorSwingTweenClose:Play()
opened = false
end
end)
Any help would be greatly appreciated!