Hello developers, how could I go about making a door animate like the picture below!
Basically, it goes outwards, then to the side.
Hello developers, how could I go about making a door animate like the picture below!
Basically, it goes outwards, then to the side.
Use TweenService for that >
And dont forget to weld the Clones to MyDoor [Original Door]!
local MyDoor = script.Parent
local MyDoorOpened = script.Parent:WaitForChild("DoorOpened") -- // There is the same Part but set to Invisible [Transparency 1 ] and Can not collide [ CanCollide = false]
local MyDoorClosed = script.Parent:WaitForChild("DoorOpened") -- // Same thing as DoorOpened but backwards, put the part where the DOOR are closed meaning just duplicate Original Door and make it CanCollide = false, Transparency = 1
local TweenService = game:GetService("TweenService")
TweenService:Create(MyDoor, TweenInfo.new(3), {CFrame = MyDoorOpened.CFrame}):Play()
-- // If you want Close then >
TweenService:Create(MyDoor, TweenInfo.new(3), {CFrame = MyDoorClosed.CFrame}):Play()
-- // TweenInfo.new(3) means the Animation will play for 3 seconds, you can change the number if you want to.
I am not quite sure how this works, are you able to explain it to me?