The error says the Message is not a part of Workspace
local Message = game.Workspace.Message If game.Players.NumPlayers == 1 then wait(0.1) Instance.New ("Message", Workspace) wait(1) Message = "You are the only Player!"
That's actually pretty far from right. The main problem is that you're trying to access Message in Workspace when it doesn't exist. You're probably looking to do something like this:
--This line creates a new message object for you to use. "Message" is the name of the object you want to make, and Workspace specifies for this object to be in the workspace. local Message = Instance.new("Message", Workspace) -- This line starts an infinite loop, repeating the code in between this line and its corresponding "end" until the game is over. while true do -- This line checks if there is only one player in the server. if game.Players.NumPlayers == 1 then -- If the condition above is true, it will set the message text here. Message.Text = "You are the only player!" -- "else" is what happens when the above condition is not true. else -- since it isn't true, clear the message. Message.Text = "" -- End the if end -- make sure this loop doesn't crash the server wait(1) -- end the "while true do" end
Remember that everything in Lua is case sensitive, in that "Instance.New" is different from "Instance.new", "If" is different from "if", and so on.
local Message = Instance.new("Message") Message.Parent = Workspace local Players = game.GetService('Players') if Players.NumPlayers == 1 then wait(0.1) Message.Text = ("You are the only Player!") wait(5) Message.Text = ('') return end