It does print “Night!” but it does not stop the sound. I also tried on roblox. Still the same.
The sound stopped on the Night of Day 1.
The script is like, glitching
Thats when it is supposed to stop according to you script once it reaches night, it will print Night! then it will stop the music.
No. But the day 0 it wont stop.
The issue then is your day night cycle, and where you have it in your script, not the music.
What’s the issue tho… The cycle is working?
The music stopped at the next night. It wont stop at current night.
When you enter the game, you are not at the beginning of a cycle, so it has to pass through the cycle for the script to kick in and stop the music.
To test this, have your game clock on 14.5 and see if it does the same.
And if this works, then you need to set your starting time in the script.
So… What do I need to do tho???
It’s on 14.5 tho?
change it to 14
see if that works
Ok. Still doesnt work. I setted it to 14
Try changing this
to this instead:
Still doesnt work. Does it work for you?
It’s because the music is placed inside of ReplicatedStorage
Every content in ReplicatedStorage is unique for each player and they can’t be affected by the server (and your script is a server script). So you’d have to place the WeekMusic folder somewhere where the server’s actions show for the player (like the Workspace)
Maybe thats why. I’ll try to put in Workspace
It worked. Thank you so much! I’ll mark it as solution.