Hi, I am very new to scripting, but I really want to get good at it. I have been following a tutorial on Youtube for making a simple Tycoon. But I have come to the point where I want to change the drop shape from a cube to a Potato. Here is the script running at the moment, I have looked at other scripts for dropping swords and hats, but I can get it to work, please help. It would be great if you could take the script add add on the part with the Potato. Also, heres the potato ID: http://www.roblox.com/asset/?id=81684482 Thanks in advanced.
01 | wait( 2 ) |
02 | workspace:WaitForChild( "PartStorage" ) |
03 |
04 | while true do |
05 | wait( 4.5 ) -- How long in between drops |
06 | local part = Instance.new( "Part" ,workspace.PartStorage) |
07 | part.BrickColor = script.Parent.Parent.Parent.DropColor.Value |
08 | part.Material = script.Parent.Parent.Parent.MaterialValue.Value |
09 | local cash = Instance.new( "IntValue" ,part) |
10 | cash.Name = "Cash" |
11 | cash.Value = 100 -- How much the drops are worth |
12 | part.CFrame = script.Parent.Drop.CFrame - Vector 3. new( 0 , 1.6 , 0 ) |
13 | part.FormFactor = "Custom" |
14 | part.Size = Vector 3. new( 1.4 , 1.4 , 1.4 ) -- Size of the drops |
15 | part.TopSurface = "Smooth" |
16 | part.BottomSurface = "Smooth" |
17 | game.Debris:AddItem(part, 20 ) -- How long until the drops expire |
18 |
19 | end |
insert a mesh part into the part
01 | wait( 2 ) |
02 | workspace:WaitForChild( "PartStorage" ) |
03 |
04 | while true do |
05 | wait( 4.5 ) -- How long in between drops |
06 | local part = Instance.new( "Part" ,workspace.PartStorage) |
07 | part.BrickColor = script.Parent.Parent.Parent.DropColor.Value |
08 | part.Material = script.Parent.Parent.Parent.MaterialValue.Value |
09 | local mesh = Instance.new( "SpecialMesh" ) |
10 | mesh.Parent = part |
11 | mesh.MeshType = "FileMesh" |
12 | mesh.MeshId = "rbxassetid://81684482" |
13 | local cash = Instance.new( "IntValue" ,part) |
14 | cash.Name = "Cash" |
15 | cash.Value = 100 -- How much the drops are worth |
this should work now. if it doesnt. tell me and i'll test it again.
i tested it with this script
1 | local part = Instance.new( "Part" ,workspace.PartStorage) |
2 | part.BrickColor = game.Workspace.DropColor.Value |
3 | part.Material = game.Workspace.MaterialValue.Value |
4 | local mesh = Instance.new( "SpecialMesh" ) |
5 | mesh.Parent = part |
6 | mesh.MeshType = "FileMesh" |
7 | mesh.MeshId = "rbxassetid://81684482" |
Right, so I did that, but, it still doesn't work.
01 | wait( 2 ) |
02 | workspace:WaitForChild( "PartStorage" ) |
03 |
04 |
05 | deb = true |
06 | script.Parent.Clicker.ClickDetector.MouseClick:connect( function (wat) |
07 | if deb = = true then |
08 | deb = false |
09 | local part = Instance.new( "Part" ,workspace.PartStorage) |
10 | part.BrickColor = script.Parent.Parent.Parent.DropColor.Value |
11 | part.Material = script.Parent.Parent.Parent.MaterialValue.Value |
12 | local mesh = Instance.new( "SpecialMesh" ) |
13 | mesh.Parent = part |
14 | mesh.MeshType = "FileMesh" |
15 | mesh.MeshId = "rbxassetid://81684482" |