When I try to make multiple rooms doors, every parts that should open their door, only open the 1st door. (If this is confusing, here's a video)
Script:
local openPart = script.Parent
local ts = game:GetService("TweenService")
local db = true
local info = TweenInfo.new(
3,
Enum.EasingStyle.Exponential,
Enum.EasingDirection.Out,
0,
false,
0
)
local open = ts:Create(door, info, {CFrame = door.CFrame + Vector3.new(0,0,4.72)})
local close = ts:Create(door, info, {CFrame = door.CFrame})
openPart.Touched:Connect(function(hit)
if db and hit.Parent:FindFirstChild("Humanoid") then
db = false
open:Play() open.Completed:Wait() task.wait(1)
close:Play() close.Completed:Wait() task.wait(0.5)
db = true
end
end)
location of the door:
** You are now Level 4! **