Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Im trying to make a Music Player GUI but it wont work attempt index gobal 'sound'?

1st script where the error is coming from function OpenSong() local IDN = script.Parent.Parent.id.Text local Sound = script.Parent.Parent.Parent.Music sound.SoundId = 'rbxassetid://'.. IDN sound:Play() end script.Parent.MouseButton1Click:connect(OpenSong)

2nd

function Stopmusic() script.Parent.Parent.Parent.Music:Stop() end script.Parent.MouseButton1Click:connect(Stopmusic)

Error

22:10:35.238 - Players.FCPDLawz.PlayerGui.Music id Player.Frame.Play.Script:4: attempt to index global 'sound' (a nil value) 22:10:35.240 - Stack Begin

1 comment

0

Try explaining better what you want us to do with this. I now have no clue what u want us to do.

1 answer

I believe the problem is that you're trying to use 'sound' when you identified it as 'Sound'. Capitalization is very important with variables.

This discussion is preserved as it was. New answers, comments, and votes are closed.