I am making a sliding doors, here is my script. I'm very new to Lua so I hope you guys can help me
Doors = script.Parent Rdoor = Doors.Right Ldoor = Doors.Left Enabled = true function Touch(touch) if Enabled == true then Enabled = false for a = 1,31 do Rdoor.CFrame = CFrame.new(Rdoor.CFrame.x - 1,Rdoor.CFrame.y,Rdoor.CFrame.z) Ldoor.CFrame = CFrame.new(Ldoor.CFrame.x + 1,Ldoor.CFrame.y,Ldoor.CFrame.z) wait(0.1) end end Doors.Out.Touched:Connect(Touch)
help? Your title should be specific! Describe your problem concisely. <--- this is annoying