How do I add opening and closing sounds to my door? (UNSOLVED)

Hey, apologies, ONCE AGAIN… (I’m terribly sorry)

I looked at the script again, and noticed it’s throwing out some red lines, I’m not sure if it’s errors, or just some reminders of some sorts? I don’t know, anyways, here they are:

UPDATE: The door won’t open anymore :confused:

1 Like

That’s because the variable is empty, put the sound instances into the variables, for instance put “script.WhateverYourSoundName” onto the opening sound variable and put “script.WhateverYourClosingSoundName” onto the closing sound variable

2 Likes

I did that, and it’s still underlining it, and as mentioned below the picture, the door won’t open anymore:

Error from output:


Script:

1 Like

Retype the line. This is because the encoding is wrong.

2 Likes

You misspelled ProximityPrompt where the red line is

2 Likes

Right, I fixed the typo, but it’s still underlining it.

1 Like

Oh I know. Retype the thing in the parantheses () because the quotation marks are from a different keyboard so studio might not recognize them

2 Likes

That’s because the encoding is wrong. The quotes are supposed to be like this: ", not this:”

2 Likes

Oh, gotchaa! Now it turned green, I suppose it’s working.

Test it, it will work if you did it correct.

Yeah, the sounds play now, but the door won’t budge a a bit-

Are there errors in the output? Or any more underlines?

1 Like

CFrameCFrame is not a valid member of Part “Workspace.Door1.Hinge”

Did the door open before? Or did it stop working after

1 Like

You typed CFrame twice after hinge (both the lines after for i = 1, 21 do)
image

1 Like

Yes, the door worked just fine before implementing the sound script, it stopped working afterwards.

You typed cframe twice so yeah. Switch “CFrameCFrame” with “CFrame*CFrame”

1 Like

god i’m clumsy, still won’t open:

Angles is not a valid member of CFrame

Can we see the script again now?

1 Like

I fixed it with RC’s CFrame*CFrame Suggestion, and it works perfectly fine! WOOHOO! Thank you both!

1 Like