Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Change Tycoon Drop Shape? (Mesh/Object)

Asked by 8 years ago

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.

01wait(2)
02workspace:WaitForChild("PartStorage")
03 
04while 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 - Vector3.new(0,1.6,0)
13    part.FormFactor = "Custom"
14    part.Size=Vector3.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 
19end

2 answers

Log in to vote
0
Answered by 8 years ago
Edited 8 years ago

insert a mesh part into the part

01wait(2)
02workspace:WaitForChild("PartStorage")
03 
04while 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
View all 23 lines...

this should work now. if it doesnt. tell me and i'll test it again.

i tested it with this script

1local 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"
0
Thanks! Will try Pot8o_Penguin 50 — 8y
0
It works!!!! Now I just need to make them larger haha, thanks! Pot8o_Penguin 50 — 8y
0
no problem as with the size, good luck :) RobloxianDestory 262 — 8y
0
Yeah... ah.... how do I change the size? XD Pot8o_Penguin 50 — 8y
View all comments (3 more)
0
put "mesh.Scale = Vector3.new(4,4,4)" anywhere in the mesh part of the script (lines 9 -12) RobloxianDestory 262 — 8y
0
never mind! I figured it out, just had to use "scale", instead of "size". Awesome! Thanks afain, I will give you credit in the discription of the game. heres the link to it if you wanna check it out aha. https://www.roblox.com/games/563743556/Potato-Tycoon Pot8o_Penguin 50 — 8y
0
accept my answer if you figured it out :3 RobloxianDestory 262 — 8y
Ad
Log in to vote
1
Answered by 8 years ago

Right, so I did that, but, it still doesn't work.

01wait(2)
02workspace:WaitForChild("PartStorage")
03 
04 
05deb = true
06script.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"
View all 29 lines...
0
my bad i missed a T. but i changed the script and fixed it RobloxianDestory 262 — 8y
0
Okay, thanks again! aha Pot8o_Penguin 50 — 8y

Answer this question