local Sensor1 = script.Parent.S1 local doorl1 = script.Parent.L1 function onTouched(hit) for i = 20,0,0.01 do doorl1:SetPrimaryPartCFrame(CFrame.new(i, 0, 0)) wait() end end Sensor1.Touched:connect(onTouched)
Why doesnt this work? Help please :(
Your for loop is inversed, wich means you have to do
for i = 20,0,-0.01 do -- Inversed the 0.01 to -0.01 because you have 20,0 instead of 0,20 doorl1:SetPrimaryPartCFrame(CFrame.new(i, 0, 0)) wait() end