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

Can someone tell me why this is wrong?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

So I'm trying to get my GUI to make a sound play, and then a part with a Click Detector stop that sound and play a different sound.

My GUI's code is:

function onClick()
    game.workspace.Phone.PhonePart.Call.IsPlaying = true
end

My Part's Code is:

function onClick()
    if script.parent.Call.IsPlaying=true then
        script.parent.Dispatch.IsPlaying=true 
        script.parent.Call.Playing = false
    end
end

And my structure is: http://prntscr.com/8vbcy3 http://prntscr.com/8vbd36

Can anyone help?

1 answer

Log in to vote
0
Answered by
ItsMeKlc 235 Moderation Voter
9 years ago

use
:Play() and :Stop() instead of .IsPlaying

2
^ umg, how can I be that dumb? TheHospitalDev 1134 — 9y
Ad

Answer this question