I've done a script what is working but when I want to close the doors it will start bug. Its opening and closing both and I dont know how to handle with that. :/
01 | if d = = false then |
02 | d = true |
03 | for i = 0 , 1 ,. 00001 do |
04 | local cfm = workspace.SurfaceBlastDoor.PrimaryPart.CFrame:Lerp(finish,i) |
05 | workspace.SurfaceBlastDoor:SetPrimaryPartCFrame(cfm) |
06 | wait() |
07 | end |
08 | else |
09 | d = false |
10 | for i = 0 , 1 ,. 00001 do |
11 | local cfm = workspace.SurfaceBlastDoor.PrimaryPart.CFrame:Lerp(starpos,i) |
12 | workspace.SurfaceBlastDoor:SetPrimaryPartCFrame(cfm) |
13 | wait() |
14 | end |
15 | end |