Help with a door opening script

I want to make an opening door script however the door has parts with surface guis and text on them whenever i run my script which is a in pairs loop it goes through all children and gets stuck on surface gui saying Cframe doesnt exist in surface gui breaking the script and ending is there a way around this.

Please.

Besides that, you will have to check whether or not does the parts being looped are a BasePart.

1 Like

Use this line after your for i, v in pairs, what it does is filter out non-parts

if v:IsA(“BasePart”) then

1 Like

Thank you it works now all i have to do is figure out cframes.