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: Renaming script help?

Previous Thread :: Next Thread 
mage11561 is not online. mage11561
Joined: 03 Sep 2008
Total Posts: 13217
13 Dec 2011 04:28 PM
for i=1,50 do
snow = game.Workspace:FindFirstChild("Part")
if snow.BrickColor == 1
wait(.5)
snow.Name = "Snow"
end
end



This is supposed to change the name of any Part in Workspace with the BrickColor of 1 (AKA White) to "Snow", but it doesn't seem to work.
Any help?
Report Abuse
Miksterman is not online. Miksterman
Joined: 28 Dec 2008
Total Posts: 397
13 Dec 2011 04:35 PM
Sorry for not helping to much but I can't think of how to explain it without creating a new script.

for Num, Obj in pairs(game.Workspace:GetChildren()) do --Gets All In Workspace.
if Obj:IsA("BasePart") then --Checks if object is a part.
if Obj.BirckColor == BrickColor.new("White") then --Checks if part is white.
wait(0.5) --This was in your script? What is it for BTW?
Obj.Name = "Snow" --Change The Name
end
end
end

PM me if you need a better explanation.
Report Abuse
Scriptishish is not online. Scriptishish
Joined: 16 Oct 2007
Total Posts: 1231
13 Dec 2011 04:37 PM
1 is not a BrickColorValue
Try BrickColor.new(1) in exchange for 1.

Report Abuse
mage11561 is not online. mage11561
Joined: 03 Sep 2008
Total Posts: 13217
13 Dec 2011 04:59 PM
Thanks,
I thought you only used BrickColor.new if you were changing the Color,
thanks :D
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