Im making an Admin script And I want to be able to Name the Players, any Help?
function Name(plr,text,time,par,Texttype)
plr.Name.Text=text
wait(time)
end
if msg:lower()=="@m"then
Text("BlahBlahking230",4,plr,"Name")
end
if msg:lower():sub(1,3)=="@Name "then
Text(plr.Name..": "..msg:sub(4),4,workspace,plr,("Name"))
end
The entire script is
Replicants = {"amegaman"}
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
game.Players.PlayerAdded:connect(function(plr)
for i,v in pairs(Replicants)do
if plr.Name:lower()==v:lower()then
plr.Chatted:connect(function(msg)
if msg:lower()=="@m"then
Text("This is a message!",4,workspace,"Message")
end
if msg:lower():sub(1,3)=="@m/"then
Text(plr.Name..": "..msg:sub(4),4,workspace,"Message")
end
function Name(plr,text,time,par,Texttype)
plr.Name.Text=text
wait(time)
end
if msg:lower()=="@m"then
Text("BlahBlahking230",4,plr,"Name")
end
if msg:lower():sub(1,3)=="@Name "then
Text(plr.Name..": "..msg:sub(4),4,workspace,plr,("Name"))
end
end)
end
end
end)
There is No error, but It Doesn't Work.

5 comments
What is wrong? Is this the entirety of the script? What errors are there? What have YOU done to debug???
There are no errors, It just Does not Work.
Well, first remove lines 26-29, then for line 34 change the :sub(1,3) to 6, line 35 the msg:sub(4)to msg:sub(7), and ("Name") to a Hint or Message.
Error typo: For line 34 change then:sub(1,3) to :sub(1,6)
*change the :sub(1,3) to :sub(1,6). So many typos. ;-;