Hello. I’m making a vault like Jailbreak Bank one. I got a free model that when you touch it, the vault open, but the problem is. I Don’t know how to make the vault returns to it’s origin position
Here is the code that open the vault.
(The touch trigger is not included. because they are separated scripts).
local One = script.Parent.Dynamite.One
local Two = script.Parent.Dynamite.Two
local Three = script.Parent.Dynamite.Three
local Four = script.Parent.Dynamite.Four
local Five = script.Parent.Dynamite.Five
local Six = script.Parent.Dynamite.Six
local Seven = script.Parent.Dynamite.Seven
local Eight = script.Parent.Dynamite.Eight
One.Transparency = 1
Two.Transparency = 1
Three.Transparency = 1
Four.Transparency = 1
Five.Transparency = 1
Six.Transparency = 1
Seven.Transparency = 1
Eight.Transparency = 1
repeat
wait()
until
script.Parent.Open.Value == true
One.Transparency = 0
wait(2)
Two.Transparency = 0
wait(2)
Three.Transparency = 0
wait(2)
Four.Transparency = 0
wait(2)
Five.Transparency = 0
wait(2)
Six.Transparency = 0
wait(2)
Seven.Transparency = 0
wait(2)
Eight.Transparency = 0
for count = 0,-0.04,-0.001 do
script.Parent:SetPrimaryPartCFrame(script.Parent:GetPrimaryPartCFrame() * CFrame.fromEulerAnglesXYZ(0, count, 0))
wait()
end
for count = -0.04,0,0.001 do
script.Parent:SetPrimaryPartCFrame(script.Parent:GetPrimaryPartCFrame() * CFrame.fromEulerAnglesXYZ(0, count, 0))
wait()
end