(Last question of the day!)
I have an error here that means that the message isn't removed. Anyone know why?
function message(text,time) --Message Function local msg = Instance.new("Message",workspace) msg.Text = text game:GetService("Debris"):AddItem(Message, time)--Same thing end
This code works with hints, but not messages. Anyone see why?
message("THE RACE HAS BEGUN!!!!!", 3)
This is how the function is referenced in later parts of the script.
Your error is on line 4.
The AddItem
method of Debris takes an object reference and, optionally, a time.
You're trying to pass in Message
, which is an undefined variable. You should instead pass in msg
:
game:GetService("Debris"):AddItem(msg, time)