generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Adding a Mesh to a Spawned Brick?

Previous Thread :: Next Thread 
pigaro is not online. pigaro
Joined: 06 Jun 2009
Total Posts: 2796
01 Jul 2015 08:15 PM
Using the following script to spawn a new brick,

function fire()
local p = Instance.new("Part")
p.Position = script.Parent.Position
p.Size = Vector3.new(2,3,2)
p.BrickColor = BrickColor.new(26)
p.BottomSurface = 0
p.TopSurface = 0
p.Name = "astronaut"
p.Parent = script.Parent
end

while true do
wait(3)
fire()
end

is it possible to add a mesh to the brick, and if so, add a texture? How might I go about doing this?
Report Abuse
Lucas1270z is not online. Lucas1270z
Joined: 27 Feb 2013
Total Posts: 439
01 Jul 2015 08:20 PM
just create the mesh and parent it to the part
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
01 Jul 2015 08:22 PM
yes, you could

you would need to create a SpecialMesh and parent it to the brick

select the mesh type (Head, FileMesh, etc)

you would then need to provide an asset id for the MeshId and TextureId

local specialMesh = Instance.new("SpecialMesh", part)

local meshid = your id here
local textureid = your id here

specialMesh.MeshType = Enum.MeshType.FileMesh
specialMesh.MeshId = "rbxassetid://"..meshid
specialMesh.TextureId = "rbxassetid://"..textureid
Report Abuse
pigaro is not online. pigaro
Joined: 06 Jun 2009
Total Posts: 2796
01 Jul 2015 08:22 PM
How might I go about creating a mesh? Sorry to ask
Report Abuse
pigaro is not online. pigaro
Joined: 06 Jun 2009
Total Posts: 2796
01 Jul 2015 08:23 PM
oops thank you
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
01 Jul 2015 08:23 PM
by "creating" a mesh, do you mean making a custom one and uploading it to roblox? if so, that is no longer possible

you can choose mesh ids and the such from current hats and gears though
Report Abuse
pigaro is not online. pigaro
Joined: 06 Jun 2009
Total Posts: 2796
01 Jul 2015 08:30 PM
Well I guess I meant how do I create this special mesh with the id and mesh of a hat for example? Would I just have a script similar to the previously posted one, but replace the things needed to create a brick and replace them with one of the three groups you posted?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image