0

# Help with my Admin Commands?

IcyEvil 260
7 years ago

I have tried to Fix this, as in Using different Methods, Such as or, but I thought you guys should see the source of the Problem And See if I am Missing anything.

Replicants = {"amegaman","papertiger67"}

function Text(text,time,par,Texttype)
local m=Instance.new(Texttype)
m.Parent=par
m.Text=text
wait(time)
if m~=nil then
m:Destroy()
end
end

for i,v in pairs(Replicants)do
if plr.Name:lower()==v:lower()then
plr.Chatted:connect(function(msg)

if msg:lower()=="@m" or "@message" then
Text("This is a message!",4,workspace,"Message")
end

if msg:lower():sub(1,3)=="@m/"or "@message/" then
Text(plr.Name..": "..msg:sub(4),4,workspace,"Message")
end
end)
end
end
end)


For The Message it Says "This is a Message!" and Than the Actual Message.

0
Perci1 4988
7 years ago
if msg:lower()=="@m" or "@message" then


You are using or incorrectly. It should be,

msg:lower()=="@m" or msg:lower() == "@message" then

if msg:lower():sub(1,3)=="@m/"or "@message/" then


First, it would probably be better to do elseif. Second, :sub(1,3) means the first three characters, so it would only work for @m/. And of course, the same problem as before. I would do this:

elseif msg:lower():sub(1,3) == "@m/" or msg:lower():sub(1,9) == "@message/" then


Hope i helped!