Hello,
I'm not really a scripter or anything I was just wondering if something like this is possible to make. You know the :m admin command in game where you type :m (Message) then whatever you said would appear to everyone in game and the screen would go a bit grayish. Well basically I was wondering if it's possible to make a microphone in game and when you walk up to the microphone and you're standing infront of the mic and you say something in chat (basically anything) like 'Hello' (Not using any admin commands) and the microphone would auto make it into the :m command and everyone in game will see you said hello (including guests). Does anyone know how to make this or if it is possible?
Let's get this straight The :m admin commands you're saying is a natural instance in ROBLOX Studio, we call it 'Message'. You can find it, if you search for it in the object list, no need for any textlabel or UIs.
To begin with: You should learn the methods of using the event, Chatted.
http://wiki.roblox.com/index.php?title=Magnitude http://wiki.roblox.com/index.php?title=API:Class/Player/Chatted
Provided by the link above; an example of the code would be:
function Chatted(message) -- codes end player.Chatted:connect(Chatted)
The argument "message" indicates the [chat] of the player or the message he typed. Afterwards, Inside the function, you can:
local m = Instance.new("Message", workspace)
Not really sure if putting it in workspace would allow 'all' players to see it, but let's hope for the best.
One of the property of this 'Message' includes "Text"
And to manage that easily, you can then put:
m.Text = message -- This is the chatted text of the player
and to remove this text at a certain amount of time, just apply:
wait(3) -- amount of time to wait before it vanishes m:Destroy()
HOWEVER, Maybe you should think of it for awhile, about what instance to use: If you're going to use the 'message object' then blocks the screen if it gets spammed; and remember, you're using a function connected to the chat of the player. And no wonder, a player can spam words every, single, time .