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: Why is the box not changing

Previous Thread :: Next Thread 
AhtnamasStudio is not online. AhtnamasStudio
Joined: 15 Jan 2014
Total Posts: 1104
26 Apr 2014 04:12 AM
So i am fairly new to scripting and instead of making randomg things i am decideing to make things from actually games. So i am trying to make it when a part called pizza hits a emptybox its name changes to fullbox and the color of the box changes to black but it dose not here is the script so far BTW the house is a vaule So the pizza belongs to a1 the box will half to go to a1 but that's later


function touch(hit)
if hit.Name == "Pizza" then
local g = hit:FindFirstChild("House")
if g ~= nil and g.Value ~= "" and script.Parent:FindFirstChild("House") == nil then
local f = g:clone()
f.Parent = script.Parent
script.Parent.Name = "FullBox"
game.Lighting.Storage.Logo:clone().Parent = script.Parent
if hit:FindFirstChild("Owner") ~= nil and hit.Owner.Value ~= nil then
hit.Owner.Value.Boxer.Value = hit.Owner.Value.Boxer.Value + 1
end
hit:remove()
script:remove()
end
end
end
script.Parent.Touched:connect(touch)
Report Abuse
Nagrath99 is not online. Nagrath99
Joined: 26 Mar 2011
Total Posts: 1537
26 Apr 2014 04:53 AM
You don't even mention BrickColor anywhere. There's nothing I can do.
Report Abuse
AhtnamasStudio is not online. AhtnamasStudio
Joined: 15 Jan 2014
Total Posts: 1104
26 Apr 2014 07:58 PM
Thanks i see what i did wrong.
game.Lighting.Storage.Logo:clone().Parent = script.Parent it should be something like
script.Parent.Color = game.Lighting.Storage.Logo.Color

Would that work

Report Abuse
ayub32 is not online. ayub32
Joined: 27 Dec 2009
Total Posts: 485
26 Apr 2014 08:10 PM
With BrickColor do this

pathtobrickhere.BrickColor = BrickColor.new("Bright red") -- You could supply an Enum or a string
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