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

I want to make these "Droppers" (Tycoon game) drop meshes instead of plain blocks, How?

It should take the mesh out of the script and apply it to the block, There are two dropper types, Manual click and auto, I've tried actually doing it myself but it just tends to break.

I'm also not sure how to make the part be right side up, (Tried to do part.rotation = (0,0,0) or something, but it also didn't work.

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"
			wait(.15)
			deb = true
	end
end)
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"
end

1 answer

Hey, i think it should work with this script.

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

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
		local mesh = Instance.new("SpecialMesh", part)
		mesh.MeshType = "FileMesh"
		mesh.MeshId = ""
		mesh.TextureId = ""
		part.TopSurface = "Smooth"
		part.BottomSurface = "Smooth"
		wait(.15)
		deb = true
	end
end)

Also i think you have to change this line to make part on the right side:

part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1.3,0)

I mean of course change numbers in Vector3.new(0,1.3,0) I hope it will help you.

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