What arguments can be used for the Chatted event? Also, is there an easier way to write this?
game.Players.PlayerAdded:connect(function (Pname)
game.Players.Chatted:connect(function (msg,rec)
end)
end)
What arguments can be used for the Chatted event? Also, is there an easier way to write this?
game.Players.PlayerAdded:connect(function (Pname)
game.Players.Chatted:connect(function (msg,rec)
end)
end)
Nope, there is no easier way, that is actually the easiest way IMO. You can have the script reset a person on command.
game.Players.PlayerAdded:connect(function (Pname)
game.Players.Chatted:connect(function (msg,rec)
if msg:lower() == "reset" then
Pname.Character:BreakJoints()
end
end)
end)
Although I don't understand the Instance portion of the event. It says right here in the ROBLOX wiki; Chatted ( String message, Instance recipient )
This is kind of like an admin script, I hope it helps in what you are talking about.
admins={"Name Here"}
function oc(msg)
if msg=="cmds"then
print("nil")
end
end
game.Players.PlayerAdded:connect(function(ack)
if ack~=nil then --If player exists
for i=1,#admins do
if string.lower(ack.Name)==string.lower(admins[i])then
ack.Chatted:connect(oc)
end end end end)
This discussion is preserved as it was. New answers, comments, and votes are closed.