So when I was scripting I can’t turn a numberValue into a string, here is the code and error.
Code:
local timer = game.ReplicatedStorage.Values.Timer
local Status = game.ReplicatedStorage.Values.Status
timer.Value = 40
repeat
if timer.Value == 0 then
timer.Value = 40
else
timer.Value = timer.Value - 1
Status.Value = "Intermission: "..tonumber(timer.Value)
end
wait(1)
until #game.Players:GetChildren() == 1 and timer.Value == 0
timer.Value = 10
repeat
wait(1)
timer.Value = timer.Value - 1
Status.Value = "Game Starting in: "tonumber(timer.Value)
until timer.Value == 0
print("Game Starting")
Error:
Players.richithebest123.PlayerGui.LobbyUi.MainFrame.StatusText.StatusScript:2: invalid argument #3 (string expected, got Instance)