I'm making a Tycoon and I want to change the Drop of my droppers into cookies, but they drop only bricks. Here is the script of the Dropper with the brick drop :
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=script.Parent.Parent.Parent.DropColor.Value part.Material=script.Parent.Parent.Parent.MaterialValue.Value 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
Can someone change it, so it drops Cookies?
@TheArcticTerminal Ok
local part = Instance.new("Cookie") part.Parent = Workspace local clone = part:Clone() print(clone.Parent) --> nil
here you go, im not sure if this works but give it a try, i added a cookie mesh and texture inside a part using instance.new
simply change the script you have with this one below.
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=script.Parent.Parent.Parent.DropColor.Value part.Material=script.Parent.Parent.Parent.MaterialValue.Value local mesh = Instance.new("Mesh", part) mesh.MeshId = "http://www.roblox.com/asset/?id=20939848" mesh.TextureId = "http://www.roblox.com/asset/?id=21456464" 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