I need help making a MUSIC GUI where all players can hear, k everything updates but buggy omg

Did you ever define what the “Name” variable was?

I’m trying to get the name of the "sound in workspace where whatever the audio is named, It’ll auto update with the string value, so in a seperate script in starterGUI I can make a local script or a normal script and update with the songName through that string Value, cause that string value will have the current song playing, It’s easier this way.

This won’t update in a client, since it’s modifying StarterGui. If you want to modify the player’s gui, you’ll have to either put the script in StarterGui, or manually retreve the player’s PlayerGui object.

I don’t want it to be client, I want everything to be server related, so everyone’s listening to just that same song everyone else is listening to, and the song gui auto updates to that string, which I’ve put in that script, and everything works, It’s in a while true loop as well so everything’s good.

Alright, if you think it should work, try testing it. If it errors, reply again and I’ll try to help you more.

1 Like

I can’t believe I just figured a solution out dude, like fr you made me use my brain, and I’ve learned on a recent tutorial string values, you could just do whatever, and tell it what to do, and telling the string value as well as the song is playing, and have it just change the string value everytime when the song ends and plays a new one, I just change that name to the string value and wow there’s no bugs, auto updates and yeah so I’ve just thought I could use a string value and yeah, thanks man.

Yep, no problem! If you have any more issues, make another reply, and I’ll try to help you.

I know this is probably solved judging by the discussion in previous replies (@cohen30 you should probably mark the thing as solved if it’s solved)

What I do personally is this:

local SongObject = script.Parent:WaitForChild("MainMusic")
local audioIDs = require(script:WaitForChild("AudioIDs"))

local MarketPlaceService = game:GetService("MarketplaceService")

-- Continuously go through all the songs, playing them
task.wait(10) -- Load time
while true do
	for i = 1, #audioIDs do
		-- Get the Product (aka sound asset) so we can display the name on the jukebox
		local ProductId = audioIDs[i]
		local ProductName = MarketPlaceService:GetProductInfo(ProductId, Enum.InfoType.Asset)
		game.workspace.JukeVibe.Sign.SurfaceGui.SongFrame.Song.Text = ProductName.Name
		
		-- Play the actual song.
		SongObject.SoundId = "rbxassetid://"..audioIDs[i]
		task.wait(3)
		SongObject:Play()
		task.wait(SongObject.TimeLength)
		task.wait(1)
		SongObject:Stop()
	end
end

I create a ModuleScript containing all my song IDs (and since I have A LOT of songs, it’s good that I store them in a module script so that it won’t be a long table in my actual main script)

Then I made a for loop that would go through each position in the table inside my ModuleScript to change the 1 sound object that I have to make it play the new song

Then I would also use MarketPlaceService:GetProductInfo() to make the for loop set the name of the SoundId to the text on the front of a jukebox I made, and it updates immediately when a new song plays.

So basically all I have to do is put the SoundId into the ModuleScript and the for loop will get the name of the song and play it for me, so it’s not super tedious.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.