Okay I am editing this script for a tycoon thing. I think I have the BrickColor area correct, but the problem is at the Material section(I think?. If someone could tell me what is wrong, I would appreciate it!
wait(2) workspace:WaitForChild("PartStorage") while true do wait(1.5) -- How long in between drops local part = Instance.new("Part",workspace.PartStorage) part.BrickColor = BrickColor.Bronze part.Material = Material.Marble local cash = Instance.new("IntValue",part) cash.Name = "Cash" cash.Value = 5 -- How much the drops are worth part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1.4,0) part.FormFactor = "Custom" part.Size=Vector3.new(1.2, 1.2, 1.2) -- Size of the drops part.TopSurface = "Smooth" part.BottomSurface = "Smooth" game.Debris:AddItem(part,20) -- How long until the drops expire end
Thanks, Jiptix
To be most technically correct, you should be using Enums when you're setting something that in Studio is a drop-down list:
wait(2) workspace:WaitForChild("PartStorage") while true do wait(1.5) -- How long in between drops local part = Instance.new("Part",workspace.PartStorage) part.BrickColor = BrickColor.new("Bronze") part.Material = Enum.Material.Marble local cash = Instance.new("IntValue",part) cash.Name = "Cash" cash.Value = 5 -- How much the drops are worth part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1.4,0) part.FormFactor = Enum.FormFactor.Custom part.Size=Vector3.new(1.2, 1.2, 1.2) -- Size of the drops part.TopSurface = Enum.SurfaceType.Smooth part.BottomSurface = Enum.SurfaceType.Smooth game.Debris:AddItem(part,20) -- How long until the drops expire end
Note that part.BrickColor = BrickColor.new("Bronze")
is not an Enum, it is a BrickColor constructor.
part.BrickColor = BrickColor.new("Bronze")
part.Material = "Marble"
What this does is it says part.Material = "The color but in a string" With the color, it gets a new BrickColor("String name of the color")