Hello! I have a time-changing script, along with GUIs that are pulled out of the ServerStorage at certain times. It works perfectly in Studio - when the clock strikes 7:20AM, (439 minutes) it displays the GUI and everything works dandy.
However, when I test it in the Player and publish it, the clock gets stuck at 7:19AM and never moves to 7:20AM. I'm not sure what could be wrong with my script, and why it would work in studio but not in the player.
Here it is -
minutesAfterMidnight = 436 -- starting time, change to 419 for 7am
sound = game.Workspace.BellSound
Door = game.Workspace.Door
Breakfast = game.ServerStorage
while true do
minutesAfterMidnight = minutesAfterMidnight + 1 -- don't change, 1 minute changes
game.Lighting:SetMinutesAfterMidnight(minutesAfterMidnight)
wait(3) -- how long it takes for time to pass, example change to 5 for 5 minutes, 3 to 3 minutes per hour
if minutesAfterMidnight == 439 then --Notifications 7:20AM
game.ServerStorage.Fire:FireServer("Breakfast is being served hot in the cafe in 10 minutes!", 7)
end
end
The GUI/fire script:
local bg = script.Parent.BG
local text = bg.Text
game.ServerStorage.Fire.OnServerEvent:connect(function(player, message, seconds)
text.Text = message
local size = bg.Size.Y.Scale
bg:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 2, true) --Gui coming out
wait(seconds)
bg:TweenPosition(UDim2.new(0, 0, -size, 0), "Out", "Quad", 2, true) --Gui going in
text.Text = ""
end)
Thanks for checking my question out!

2 comments
Can we see the script that happens when the fire remoteevent is being fired?
Sure thing! Thanks!