I'm currently working on a GUI that shows the player what song is currently playing. I have gotten a Sound object with a script that keeps changing the song, and it works just fine. And I've also done a GUI in StarterGui that shows everything.
I have a Gui, Frame and TextLabel, inside the TextLabel is a script, that should change the player's GUI based on that property, this is how it looks like:
--\\ VARIABLES local sound = game.Workspace.Misc.PlaySongs local playerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui") local text = playerGui.CurrentSong.Frame.SongName --// VARIABLES --\\ CHANGER if sound.SoundId == 3734646965 then text.Text = "Buttercup" elseif sound.SoundId == 1560173003 then text.Text = "Oh Klahoma" elseif sound.SoundId == 3524204087 then text.Text = "Dead Weight" elseif sound.SoundId == 4664971308 then text.Text = "Life Could Be A Dream!" elseif sound.SoundId == 3687583783 then text.Text = "Lolipop" elseif sound.SoundId == 4509807932 then text.Text = "Chill Mix idrk lol" end
But it doesn't change anything, I've tested it with a print("") as well, for some reason it does not see when the property is changed. Any help would be greatly appreciated! Thanks!
REMEMBER: the songs not only are composed with the id! they have an extension also "rbxassetid" look:
--\\ VARIABLES local sound = game.Workspace.Misc.PlaySongs local text = script.Parent --// VARIABLES --\\ CHANGER while true do wait(0.1) if sound.SoundId == "rbxassetid://3734646965" then --Convert the number value to string --value text.Text = "Buttercup" elseif sound.SoundId == "rbxassetid://1560173003" then text.Text = "Oh Klahoma" elseif sound.SoundId == "rbxassetid://3524204087" then text.Text = "Dead Weight" elseif sound.SoundId == "rbxassetid://4664971308" then text.Text = "Life Could Be A Dream!" elseif sound.SoundId == "rbxassetid://3687583783" then text.Text = "Lolipop" elseif sound.SoundId == "rbxassetid://4509807932" then text.Text = "Chill Mix idrk lol" end end
I also highly recommend to shorten the song list part,you will need it
And change the script to server script, not local