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

How to insert mesh in created part?

I want to create part with meshes for better tycoon.

>  function fire()
>      local p = Instance.new("Part")
>      p.Position = script.Parent.Position
>      p.Size = Vector3.new(1,2,1)
>      p.BrickColor = BrickColor.new(26)
>      p.BottomSurface = 0
>      p.TopSurface = 0
>      p.Name = "TycoonBrick" 
>      p.Parent = script.Parent
> 	local Mesh
> 	local Mesh = Instance.new( "Mesh", p) -- Mesh is just called mesh
> end 
> 
> 
> while true do
>      wait(1) 
>      fire()
> end

-Thanks.

1 comment

0

You need to change the MeshId

2 answers

✓ Accepted answer

Hope this is what you wanted.

>  function fire()
>      local p = Instance.new("Part")
>      p.Position = script.Parent.Position
>      p.Size = Vector3.new(1,2,1)
>      p.BrickColor = BrickColor.new(26)
>      p.BottomSurface = 0
>      p.TopSurface = 0
>      p.Name = "TycoonBrick" 
>      p.Parent = script.Parent
>   local Mesh
>   local Mesh = Instance.new( "Mesh", p) -- Mesh is just called mesh
	Mesh.MeshId = 'rbxassetid://0000000' --This is what you need to add. where they have the zeros, thats the id you put.
> end 
> 
> 
> while true do
>      wait(1) 
>      fire()
> end

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