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

How do you change the size of a mesh when using a mesh dropper in a tycoon?

Below is the code im using but when i change size of drops it does nothing

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

meshDrop = true
--------------------
-- Mesh Settings: -- [If you want a mesh drop, set meshDrop to true up on top.]
-- Look at the mesh properties and change the inside of the quotes below to the appropriate
-- full link or the rbxasset:// style, doesnt matter which one you see in the mesh you want

meshID = "http://www.roblox.com/asset/?id=16190555"  
textureID = "http://www.roblox.com/asset/?id=16285875"
--------------------


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 = 70 -- 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(2.5, 2.5, 2.5) -- Size of the drops
			if meshDrop == true then
			local m = Instance.new("SpecialMesh",part)
			m.MeshId = meshID
			m.TextureId = textureID
			end
			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

Instead of part.Size, try adding m.Scale below the Texture id part. Keep using Vector3's though

1 answer

I am no professional when it comes to scripting, but I believe that meshes do not have a Size property, instead they have a Scale property. Try changing Scale instead of Size on line 27. Hope this helped.

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