Hi I am currently making a tycoon...and I am using Zednov's Tycoon Kit I wanted to know how I can change the drops out of the Dropper to a mesh. now... I have searched It and there is one problem, I dont know where to put the added parts or where to modify the script, so I will leave the whole dropper script down below and please tell me which line I should paste it on!
Thanks :DD
debounce = false script.Parent.Button.ClickDetector.MouseClick:connect(function() if debounce == false then debounce = true script.Parent.Button.BrickColor=BrickColor.new("Bright red") local part = Instance.new("Part",workspace) local cash = Instance.new("IntValue",part) cash.Name = "Cash" part.BrickColor=script.Parent.Parent.Parent.DropColor.Value cash.Value = 1 part.CFrame = script.Parent.Drop.CFrame part.Size=Vector3.new(1,1,1) game.Debris:AddItem(part,20) wait(0.2) -- Time to wait in between clicks debounce = false script.Parent.Button.BrickColor=BrickColor.new("Bright green") end end)
You see this question was already answered before you need to search it but i'll help you
Firstly in the script we need to know where the part is inserted, Line 6,7
We would enter some new mesh such as local mesh=Instance.new("SpecialMesh",part)
Then we change that SpecialMesh, we can change meshes to different things and user created ones!
To use ones that are already loaded
We could use Enum
Now il show you the code that uses Enum.MeshType.Brick
debounce = false script.Parent.Button.ClickDetector.MouseClick:connect(function() if debounce == false then debounce = true script.Parent.Button.BrickColor=BrickColor.new("Bright red") local part = Instance.new("Part",workspace) local cash = Instance.new("IntValue",part) local mesh = Instance.new("SpecialMesh",part)---This Inserts it to the part as its spawned mesh.MeshType=Enum.MeshType.Brick--You can cycle through this cash.Name = "Cash" part.BrickColor=script.Parent.Parent.Parent.DropColor.Value cash.Value = 1 part.CFrame = script.Parent.Drop.CFrame part.Size=Vector3.new(1,1,1) game.Debris:AddItem(part,20) wait(0.2) -- Time to wait in between clicks debounce = false script.Parent.Button.BrickColor=BrickColor.new("Bright green") end end)
To use your own Meshid or Texture id we need to use Enum.MeshType.FileMesh
This makes the mesh a FileMesh where you can choose what mesh id you want and Texture id!
So we use Mesh.MeshId=("id here plz")--Id here and Mesh.TextureId=("Texture id here plzplz")--id here
heres a script that makes the mesh into a brain
debounce = false script.Parent.Button.ClickDetector.MouseClick:connect(function() if debounce == false then debounce = true script.Parent.Button.BrickColor=BrickColor.new("Bright red") local part = Instance.new("Part",workspace) local cash = Instance.new("IntValue",part) local mesh = Instance.new("SpecialMesh",part)---This Inserts it to the part as its spawned mesh.MeshType=Enum.MeshType.FileMesh--You can cycle through this mesh.MeshId=("http://www.roblox.com/asset/?id=28199189")---makes the mesh a brain mesh.TextureId=("http://www.roblox.com/asset/?id=23889683")---makes the brain have texture cash.Name = "Cash" part.BrickColor=script.Parent.Parent.Parent.DropColor.Value cash.Value = 1 part.CFrame = script.Parent.Drop.CFrame part.Size=Vector3.new(1,1,1) game.Debris:AddItem(part,20) wait(0.2) -- Time to wait in between clicks debounce = false script.Parent.Button.BrickColor=BrickColor.new("Bright green") end end)
If you found this helpful please accept my answer
Thank you.