Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I hint message rotation script?

Asked by 9 years ago

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

01local ws = game.Workspace
02local SoundId = 145462567  -- Sound Id Of The Sound
03    local Asset = game:GetService("MarketplaceService"):GetProductInfo(SoundId) --[[Get's Product Information Of The Sound--]]
04 
05local freedom = Instance.new("Sound")
06freedom.Name = "Freedom"
07freedom.Pitch = 0.4
08freedom.Volume = 1
09freedom.SoundId = SoundId
10freedom.Looped = true
11freedom.Parent = game.Workspace
12 
13local todcheck = 100
14 
15local stime = 5
View all 38 lines...

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)

01sec = game.Workspace.ServerSec
02minu = game.Workspace.ServerMin
03hours = game.Workspace.ServerHour
04while true do
05    wait(1)
06    sec = sec + 1
07    if sec == 60 then
08        sec = 0
09        minu = minu + 1
10    end
11    if minu == 60 then
12        minu = 0
13        hours = hours + 1
14    end
15end

Answer this question