How do I hint message rotation script?
I'm trying to make a script that plays a song on repeat and scycles through messages, Here is the code I have so far
01 | local ws = game.Workspace |
02 | local SoundId = 145462567 |
03 | local Asset = game:GetService( "MarketplaceService" ):GetProductInfo(SoundId) |
05 | local freedom = Instance.new( "Sound" ) |
06 | freedom.Name = "Freedom" |
09 | freedom.SoundId = SoundId |
11 | freedom.Parent = game.Workspace |
17 | local currentSongMessage = Instance.new( "Hint" ) |
19 | currentSongMessage.Text = "Now playing: " .. Asset.Name.. " on loop" |
20 | currentSongMessage.Parent = game.Workspace |
21 | currentSongMessage.Name = "BGMMessage" |
25 | currentSongMessage.Text = "The current time of day is " ..game.Lighting.TimeOfDay |
27 | todcheck = todcheck - 1 |
30 | currentSongMessage.Text = "Now playing: " .. Asset.Name.. " on loop" |
33 | currentSongMessage.Text = "The server has been up for " .. ws.ServerHours.. " hours " ..ws.ServerMin.. " minutes " ..ws.ServerSec.. " seconds" |
The output of this code is the hint of the "Now playing: Freedom by Sotero Ange on loop"
then it goes to the time of day then it goes back to the nowplaying message and then stops.
The code for my server time getter is as follows (the ServerSec,Min,Hour are Number variables in the game.Workspace)
01 | sec = game.Workspace.ServerSec |
02 | minu = game.Workspace.ServerMin |
03 | hours = game.Workspace.ServerHour |