local NPC = game.ReplicatedStorage.Zombie local spawner = script.Parent GameTime = game.StarterGui.Timer.Frame.TextLabel
if GameTime.Text == "Game" then repeat local Clone = NPC:Clone() Clone.Torso.CFrame = spawner.CFrame Clone.Parent = workspace wait(2) until GameTime.Text == "Intermission" end
GameTime = game.StarterGui.Timer.Frame.TextLabel
The reason your code isn't working is due to that line up there. "StarterGui" will remain exactly the same like in Studio. You are looking for something known as "PlayerGui", which is essentially a place where everything is copied from StarterGui into the player, which is what they see when they play the game.
DO NOTE HOWEVER: With FilteringEnabled being the standard for games (rightfully so), PlayerGui will not be accessible by the server. This is why it's strongly recommended to, for example, make a StringValue in ServerStorage deciding whether it is Intermission or whether the game is starting, rather than using the player's GUI (which is also a very major security flaw)