BoolValue not changing

Hey there, im trying to make a lyrics script for a radio for specific songs. However, the boolean values just wont change or anything. Any help is appreciated


local Radio = script.Parent:FindFirstChild("MusicPlayer")
local nobody = script.Parent:WaitForChild("nobodyCaresEnoughToCallSong")
local siren = script.Parent:WaitForChild("sirenSong")
local nobodyscript = script.Parent:FindFirstChild("NobodyCaresEnoughtoCall")
local sirenscript = script.Parent:FindFirstChild("Siren")
siren.Value = false
nobody.Value = false

	siren.Value = false
	nobody.Value = false
	if Radio.CurrentSong.SoundId == "rbxassetid://14325970850" then
		siren.Value = true
		print("Enabled Siren")
		siren.Value = false -- Disable Siren after waiting for the sound to finish
	elseif Radio.CurrentSong.SoundId == "rbxassetid://14326066603" then
		nobody.Value = true
		print("Enabled NobodyCaresEnoughtoCall")
		nobody.Value = false -- Disable NobodyCaresEnoughtoCall after waiting for the sound to finish

	siren.Value = false
	nobody.Value = false

Are these values just false?
What is printed in the output?

The only thing thats printed it “song started” and “Enabled (song)”, and the values are changed in the event

Are you sure the CurrentSong`s isLoadad value is true?
(is the song loaded)

Edit: I meant adding something like:

repeat wait() until Radio.CurrentSong.IsLoaded == true

You said the booleans aren’t changing but do you hear any sound?
Do the sounds change at all?
You also said "The only thing thats printed it “song started” and “Enabled (song)” but I don’t see anywhere in this script that says print("song started").


    print(CurrrentSong.SoundID)  --to see if you're getting the number you expect.

Another thing, what is changing the CurrentSong.SoundId to cause the first function to fire? There’s nothing in this script that changes the SoundId to cause the function to fire.

1 Like

theres another script that changes the id of songs

So answering my 2 other questions would help us help you…

Did you try the print line I suggested as well?

The sounds change, the other script i was talking about has the song started thingy, and for now the sounds dont work but the ids are in the radio

and yes i also added that print

You don’t :Play() the songs in this script, you just change the boolvalues.
Do you play the songs in the other script? If so why not just change the boolvalues and wait times there?

Is this is a serverscript or localscript, if it is a loaclscript, the value will change locally, and world not change on the server