Untitled
unknown
plain_text
2 years ago
612 B
9
Indexable
local Part = script.Parent
local Right = workspace.right
local Left = workspace.left
local function Open(player)
if (player.Parent:FindFirstChild("Humanoid")) then
for i = 1,20 do
wait()
Right.Position -= Vector3.new(0,0,0.05)
Left.Position += Vector3.new(0,0,0.05)
end
wait(1)
end
end
local function Close(player)
if (player.Parent:FindFirstChild("Humanoid")) then
for i = 1,20 do
wait()
Right.Position += Vector3.new(0,0,0.05)
Left.Position -= Vector3.new(0,0,0.05)
end
wait(1)
end
end
Part.Touched:Connect(Open)
Part.TouchEnded:Connect(Close)Editor is loading...