Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make my tycoon produce a mesh opposed to the standard block?

I'm making a tycoon and I need the Dropper (Part) to drop a Certain hat other than any type of regular brick here is the script im using can you please add the part with the mesh :D? (So I just need it to added where I want to put a mesh here opposed to the block and I don't know how) Code:

wait(2)
workspace:WaitForChild("PartStorage")


deb = true 
script.Parent.Clicker.ClickDetector.MouseClick:connect(function(wat)
	if deb == true then
		deb = false
			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 = 1 -- How much the drops are worth
			part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1.3,0)
			part.FormFactor = "Custom"
			part.Size=Vector3.new(1, 1, 1) -- Size of the drops
			part.TopSurface = "Smooth"
			part.BottomSurface = "Smooth"
			game.Debris:AddItem(part,20) -- How long until the drops expire
			wait(.15)
			deb = true
	end
end)

1 comment

0

Put your code in a code block. It's the blue button while editing your question. You have to or the odds are no one will be able to help you.

2 answers

✓ Accepted answer

Edit line 22, to get the MeshId, find the mesh you want the Part to have and copy the MeshId. (Pleae UpVote, so I can Upvote others) Hope it helps! :D

wait(2)
workspace:WaitForChild("PartStorage")


deb = true 
script.Parent.Clicker.ClickDetector.MouseClick:connect(function(wat)
    if deb == true then
        deb = false
            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 = 1 -- How much the drops are worth
            part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1.3,0)
            part.FormFactor = "Custom"
            part.Size=Vector3.new(1, 1, 1) -- Size of the drops
            part.TopSurface = "Smooth"
            part.BottomSurface = "Smooth"
	
mesh = Instance.new("SpecialMesh",part)
mesh.MeshId = ***EDIT HERE***

            game.Debris:AddItem(part,20) -- How long until the drops expire
            wait(.15)
            deb = true
    end
end)

@Spork after I did that and tested it, this showed up.

while true do
	script.Parent.Velocity = script.Parent.CFrame.lookVector*23
	wait(0.2)
end

This discussion is preserved as it was. New answers, comments, and votes are closed.