Please help
local DL = script.Parent.sdsd Game.Workspace.k.Teknikk.DoorSensorInn.Sensor.Touched:connect(function(p) if p~= nil then for L=1, #DL do DL[L].Transparency = "0.5" DL[L].CanCollide = true end wait(2) for L=1, #DL do DL[L].Transparency = "0" DL[L].CanCollide = false end end end
Here I rescripted your one, Put a part in the workspace called part.
local Door = script.Parent -- The part function onTouch() -- When touched Door.CanCollide = False -- Walkthroughable Door.Transparency = 0.5 -- Transparent Door.BrickColor = BrickColor:Random() -- Changes colour (If you want, if not just remove this line and the other one) wait(2) -- waits 2 seconds Door.CanCollide = true -- Solid again Door.Transparency = 0 -- Opaque Door.BrickColor = BrickColor:Random() -- Changes colour again (If not then remove this line too) end Door.Touched:connect(onTouch)
Please explain what is this, What is does In more detail otherwise we don't know!