I am creating a MusicGui in a game. It functions perfectly fine when im in edit or build mode, However when you join an actual server it doesn't function at all. I pulled up the output in the server and i get the error message "Song is not a Valid Member of ScreenGui" but again I do not get this error in edit or build modes.
It is set up like this
Players
PlayerName
PlayerGui
MusicGui
Song
Frame
Play
localscript
Next
localscript
Stop
localscript
It also says the error is in line 2 of Play, Next, and Stop's scripts when in the server.
This line is the same in all three scrips and it is:
Song = script.Parent.Parent.Parent.Song
If you need the whole scripts here they are
Play localscript
Player = game.Players.LocalPlayer
Song = script.Parent.Parent.Parent.Song
function PlaySong()
Song:Play()
end
script.Parent.MouseButton1Down:connect(PlaySong)
Next localscript
Player = game.Players.LocalPlayer
Song = script.Parent.Parent.Parent.Song
function NextSong()
if Song.SoundId == "http://www.roblox.com/asset/?id=143959455" then
Song:Stop()
Song.SoundId = "http://www.roblox.com/asset/?id=131111368"
elseif Song.SoundId == "http://www.roblox.com/asset/?id=131111368" then
Song:Stop()
Song.SoundId = "http://www.roblox.com/asset/?id=142435409"
elseif Song.SoundId == "http://www.roblox.com/asset/?id=142435409" then
Song:Stop()
Song.SoundId = "http://www.roblox.com/asset/?id=155179087"
elseif Song.SoundId == "http://www.roblox.com/asset/?id=155179087" then
Song:Stop()
Song.SoundId = "http://www.roblox.com/asset/?id=143959455"
end
end
script.Parent.MouseButton1Down:connect(NextSong)
Stop localscript
Player = game.Players.LocalPlayer
Song = script.Parent.Parent.Parent.Song
function PlaySong()
Song:Stop()
end
script.Parent.MouseButton1Down:connect(PlaySong)
and again this only happens in the server, in edit or build mode it works just find with no error messages! Thanks!

2 comments
okay thanks
I am afraid I cannot figure it out, sorry.