Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

sliding door every 25s?

Asked by 3 years ago

can someone help me with a script on a door that opens that door and close it 2 seconds after every 25s?

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

Basic simple door, put this script inside the block.

--[[if you want it to open automatically looply then do this]]

while wait(25) do
script.Parent.CanCollide = false
script.Parent.Transparency = 0.6
wait(2)
script.Parent.CanCollide = true
script.Parent.Transparency = 0
end
--[[ if you want the door to open when it's touched. do this.]]
local function KewlBoi(Touched)
    local char = Touched.Parent
    if char:FindFirstChild('Humanoid') then
        script.Parent.CanCollide = false
        script.Parent.Transparency = 0.6
        wait(2)
        script.Parent.CanCollide = true
        script.Parent.Transparency = 0
    end
end

script.Parent.Touched:Connect(KewlBoi)
0
thanks! OctavianH0310 25 — 3y
Ad

Answer this question