generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Admin Commands Help... Again.

Previous Thread :: Next Thread 
Frozeis is not online. Frozeis
Joined: 25 Jun 2015
Total Posts: 35
14 Jul 2016 02:11 AM
Yes, It was in the wrong thread. It was in game design and now technical support. I finally found the right place for this. If this is the wrong forum, I am sorry.

Now to get straight to what it said. It said this:

I didn't get any reply from my old thread. It is 3 days old.
Is it okay if I repost this because I did not get any reply. Continuing on.
Also, Delete the old thread in game design forum.

Yes, I know. Again. Sorry if I posted this too soon.
Let's get straight to the point.

Now, I need scripting assistance. I have "me" and player name now but not all. My "all" was not working. Here it is:

function onChatted(player, message)
local function findPlayer(name)

local plrz = {}
-- Specific types of things you can use. For example: :kill all (This kills all players.)
-- Example 2: :fire builderman (This sets builderman on fire.)

for _, plr in ipairs(game.Players:GetPlayers()) do
if plr.Name:lower() == name:lower() then
return plr
elseif name == "me" then
return player
end
end
end
end

game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(message) onChatted(message, player) end)
end)
Report Abuse
Proxidious is not online. Proxidious
Joined: 18 Jul 2011
Total Posts: 1339
14 Jul 2016 02:19 AM
You clearly didn't write this yourself, if you did you should be able to figure it out on your own.
Report Abuse
calvin56 is not online. calvin56
Joined: 18 May 2007
Total Posts: 784
14 Jul 2016 05:03 AM
me should be your player name, not me
Report Abuse
Frozeis is not online. Frozeis
Joined: 25 Jun 2015
Total Posts: 35
15 Jul 2016 04:25 PM
I did write it myself. I did not steal it from anything.
Report Abuse
xXTHEAWSOMEQWEENXx is not online. xXTHEAWSOMEQWEENXx
Joined: 12 Jun 2014
Total Posts: 5
15 Jul 2016 04:29 PM
Wait a second, so the problem is that 'all' wasn't working?

here:

function onChatted(player, message)
local function findPlayer(name)
local plrz = {}
for _, plr in ipairs(game.Players:GetPlayers()) do
if plr.Name:lower() == name:lower() then
return plr
elseif name == "me" then
return player
elseif name == 'all' then
for i,v in pairs(game:GetService'Players':GetPlayers())do
return v
end
end
end
end
end

game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(message) onChatted(message, player) end)
end)


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image