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: Help with for method?

Previous Thread :: Next Thread 
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
24 Aug 2013 10:25 PM
[ Content Deleted ]
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
24 Aug 2013 10:28 PM
[ Content Deleted ]
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
24 Aug 2013 10:40 PM
[ Content Deleted ]
Report Abuse
shonclub is not online. shonclub
Joined: 05 Sep 2009
Total Posts: 1331
24 Aug 2013 10:45 PM
game.Players.PlayerAdded:connect(function(added)
added.CharacterAdded:connect(function(char)

if char.Name == "baheeg" or char.Name == "abdula987" then
added.Chatted:connect(function(chat)
if chat == "disco" then
for i,v in pairs(game.Workspace:GetChildren()) do
if v:IsA("Part") then
v.Color = Color3.new(math.random(255)/255,math.random(255)/255,math.random(255)/255) -- 0 - 255/255 for color3.new
wait(10)
v.BrickColor = BrickColor.new("Medium stone grey")
end
end
end
end)
end

end)
end)
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
24 Aug 2013 10:55 PM
[ Content Deleted ]
Report Abuse
shonclub is not online. shonclub
Joined: 05 Sep 2009
Total Posts: 1331
24 Aug 2013 10:57 PM
Oh, derp

game.Players.PlayerAdded:connect(function(added)
added.CharacterAdded:connect(function(char)

if char.Name == "baheeg" or char.Name == "abdula987" then
added.Chatted:connect(function(chat)
if chat == "disco" then
for i,v in pairs(game.Workspace:GetChildren()) do
if v:IsA("Part") then
v.Color = Color3.new(math.random(255)/255,math.random(255)/255,math.random(255)/255) -- 0 - 255/255 for color3.new
end
end
wait(10)
v.BrickColor = BrickColor.new("Medium stone grey")
end
end
end
end)
end

end)
end)
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
24 Aug 2013 10:58 PM
[ Content Deleted ]
Report Abuse
shonclub is not online. shonclub
Joined: 05 Sep 2009
Total Posts: 1331
24 Aug 2013 11:01 PM
game.Players.PlayerAdded:connect(function(added)
added.CharacterAdded:connect(function(char)

if char.Name == "baheeg" or char.Name == "abdula987" then
added.Chatted:connect(function(chat)
if chat == "disco" then
for i,v in pairs(game.Workspace:GetChildren()) do
if v:IsA("Part") then
v.Color = Color3.new(math.random(255)/255,math.random(255)/255,math.random(255)/255)
end
end
wait(10)
v.BrickColor = BrickColor.new("Medium stone grey")
end
end
end
end)
end

end)
end)


I just ereased the comments, any output?
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
24 Aug 2013 11:02 PM
[ Content Deleted ]
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
25 Aug 2013 01:05 AM
[ Content Deleted ]
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
25 Aug 2013 02:58 AM
local Chatted = false
game.Players.PlayerAdded:connect(function(added)
added.Chatted:connect(function(chat)
if added.Name == "baheeg" or added.Name == "abdula987" then
if chat == "disco" and not Chatted then
Chatted = true
for Index, Child in pairs(Workspace:GetChildren()) do
if Child:IsA("BasePart") then
Child.BrickColor = BrickColor.Random()
wait(10)
Child.BrickColor = BrickColor.new("Medium stone grey")
Chatted = false
end
end
end
end
end)
end)
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
25 Aug 2013 03:00 AM
No, that won't work as expected, give me a minute.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
25 Aug 2013 03:09 AM
local Chatted = false
game.Players.PlayerAdded:connect(function(added)
added.Chatted:connect(function(chat)
if added.Name == "baheeg" or added.Name == "abdula987" then
if chat == "disco" and not Chatted then
Chatted = true
for Index, Child in pairs(Workspace:GetChildren()) do
if Child:IsA("BasePart") then
Child.BrickColor = BrickColor.Random()
Spawn(function()
wait(10)
Child.BrickColor = BrickColor.new("Medium stone grey")
end)
end
end
Chatted = false
end
end
end)
end)
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