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 » Scripting Helpers
Home Search
 

Re: Would this work?

Previous Thread :: Next Thread 
askshane is not online. askshane
Joined: 16 Feb 2011
Total Posts: 9151
09 Aug 2013 12:41 PM
Yes, msg is already defined, but I can't test it due to me not being able to play a game due to my computer.
if string.sub(Msg,1,10) == "stealhats/" then
local Players = GetPlayers(Speaker, string.sub(Msg,11))
if #Players < 1 then return end
for i=1,#Players do
for x,v in pairs(Players[i].Character:GetChildren()) do
if v:IsA("Hat") then
v.Parent = Players[i].Character
end
end
end
end

~�ʘ‿ʘ�~
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
09 Aug 2013 12:47 PM
Should work, but I wouldnt use for i = 1, #Players, I would use for i, v or _, plr
Report Abuse
askshane is not online. askshane
Joined: 16 Feb 2011
Total Posts: 9151
09 Aug 2013 01:04 PM
I normally just use it in all my commands (for i=1,#Players do)
so yeah

~�ʘ‿ʘ�~
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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