Yionee
|
  |
| Joined: 03 Oct 2010 |
| Total Posts: 322 |
|
|
| 01 Sep 2011 11:08 PM |
I left Roblox for about two weeks because of personal matters. Now, that I am back, I want to continue making my admin commands but I seem to have forgotten how. I don't know how I could let myself forget how to make admin scripts. Here is a shortened piece of code I made that has one command. When going into Roblox Studio and testing it, I get no errors so I tried to shorten it so that you guys would not have to take a long time searching. I have been working on this about an hour and I don't know what is wrong.
admin_list = {"Yionee"}
function yio(pl) for i = 1, #admin_list do if pl.Name == admin_list[i] then pl.Chatted:connect(function() Spawn(function() chat(msg) end) end) end end end game.Players.PlayerAdded:connect(yio)
chat = function(msg)
if string.sub(msg,1,2) == "m/" then local mess = Instance.new("Message",Workspace) mess.Text = string.sub(msg,5) wait(msg:sub(3)) mess:remove() end
end |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 01 Sep 2011 11:10 PM |
(msg,3)
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
Yionee
|
  |
| Joined: 03 Oct 2010 |
| Total Posts: 322 |
|
|
| 01 Sep 2011 11:15 PM |
| Are you talking about the wait() ? |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 01 Sep 2011 11:16 PM |
there are multiple problems with that code
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
Yionee
|
  |
| Joined: 03 Oct 2010 |
| Total Posts: 322 |
|
| |
|
Yionee
|
  |
| Joined: 03 Oct 2010 |
| Total Posts: 322 |
|
|
| 01 Sep 2011 11:18 PM |
| I haven't used string.sub in a LONG time and IDK if I even used that right. |
|
|
| Report Abuse |
|
|
Yionee
|
  |
| Joined: 03 Oct 2010 |
| Total Posts: 322 |
|
|
| 01 Sep 2011 11:21 PM |
FAIL FAIL FAIL FAIL!!
I didn't even have the aruguement for the Chatted event! |
|
|
| Report Abuse |
|
|
|
| 01 Sep 2011 11:56 PM |
Actually the sub positions are fine.
if he said something like m/06Hello world! this is a message that takes 6 seconds to read!
in chat then that message appears for "06" seconds.
props, thats really original. |
|
|
| Report Abuse |
|
|