|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|