Problem with end)

Whenever I do something like this:
Sound = script.Sound

– v1.0.2

– INSTRUCTIONS –

– Step 1: Put the sound you inserted into workspace inside of this script.

– Step 2: Rename the sound to: Sound, if it’s named anything other than Sound.

– Step 3: To make the sound looped, or whatever, select the sound inside of this script, and enable the property in properties.


Sound:Play()

print(“Successfully playing music.”)

if Sound.Playing == false then

Sound.Playing = true

print(“Attempted to fix music.”)

wait(3)

if Sound.Playing == true then

print(“Successfully fixed music!”)

end)
The ) in end) shows a red underline in it, when it has to have an end) in the script or else it won’t work, how do I fix this?

1 Like

Can you send more of the code please?

There are a couple errors here and it’s mainly with where you put the ends. You need to put an end after each if statement. Also, you don’t need an end with a closing parentheses in this example.

I may have made mistakes because I’m in a rush right now

Make sure all your ends match up and all your functions have () if they are needed or not. Rewrite the script if yo have to.

You are missing an end statement. The fixed one should look this:

Sound:Play()
print(“Successfully playing music.”)
if Sound.Playing == false then
    Sound.Playing = true
    print(“Attempted to fix music.”)
    wait(3)
    if Sound.Playing == true then
        print(“Successfully fixed music!”)
    end
end

Although I have no idea why would you ever need a script like this but you do you.

please format code correctly: use ```