Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I don't know how to wait() while a song of 10-13 secs is playing? not solved

Asked by 10 years ago
script.Parent.MouseButton1Click:connect(function()
    game.Workspace.GameMessage.Text="True Or False?, Carrots are fruits." --Where the message will go
    Wait(3)
    game.Workspace.GameMessage.Text=""
script.Parent.Parent.Parent.Parent.Sound:Play() ---- wait 10-13 secs while song is playing
end)

wait(10)

function divider()  ---- and then do   function divider
    local div = game.Workspace.Divider.Door
    local fal = game.Workspace.Flse.Door

    div.Transparency= 0.75
    div.CanCollide= true
    wait(1)

    fal.Transparency= 0.5 
    fal.CanCollide= false
    wait(5)
    fal.Transparency= 0
    fal.CanCollide= true

    wait(1)
    div.Transparency= 1
    div.CanCollide= false
end

divider()


Answer this question