You see this question was already answered before you need to search it but i'll help you
Firstly in the script we need to know where the part is inserted, Line 6,7
We would enter some new mesh such as local mesh=Instance.new("SpecialMesh",part)
Then we change that SpecialMesh, we can change meshes to different things and user created ones!
To use ones that are already loaded
We could use Enum
Now il show you the code that uses Enum.MeshType.Brick
debounce = false
script.Parent.Button.ClickDetector.MouseClick:connect(function()
if debounce == false then
debounce = true
script.Parent.Button.BrickColor=BrickColor.new("Bright red")
local part = Instance.new("Part",workspace)
local cash = Instance.new("IntValue",part)
local mesh = Instance.new("SpecialMesh",part)
mesh.MeshType=Enum.MeshType.Brick
cash.Name = "Cash"
part.BrickColor=script.Parent.Parent.Parent.DropColor.Value
cash.Value = 1
part.CFrame = script.Parent.Drop.CFrame
part.Size=Vector3.new(1,1,1)
game.Debris:AddItem(part,20)
wait(0.2)
debounce = false
script.Parent.Button.BrickColor=BrickColor.new("Bright green")
end
end)
To use your own Meshid or Texture id we need to use Enum.MeshType.FileMesh
This makes the mesh a FileMesh where you can choose what mesh id you want and Texture id!
So we use Mesh.MeshId=("id here plz")--Id here
and Mesh.TextureId=("Texture id here plzplz")--id here
heres a script that makes the mesh into a brain
debounce = false
script.Parent.Button.ClickDetector.MouseClick:connect(function()
if debounce == false then
debounce = true
script.Parent.Button.BrickColor=BrickColor.new("Bright red")
local part = Instance.new("Part",workspace)
local cash = Instance.new("IntValue",part)
local mesh = Instance.new("SpecialMesh",part)
mesh.MeshType=Enum.MeshType.FileMesh
mesh.MeshId=("http://www.roblox.com/asset/?id=28199189")
mesh.TextureId=("http://www.roblox.com/asset/?id=23889683")
cash.Name = "Cash"
part.BrickColor=script.Parent.Parent.Parent.DropColor.Value
cash.Value = 1
part.CFrame = script.Parent.Drop.CFrame
part.Size=Vector3.new(1,1,1)
game.Debris:AddItem(part,20)
wait(0.2)
debounce = false
script.Parent.Button.BrickColor=BrickColor.new("Bright green")
end
end)
If you found this helpful please accept my answer
Thank you.
4 comments
Don't ask for code that you can copy and paste. This is a site to learn.
This is why I unrecommend free models. You dont know anything they are doing
First let me tell you. You won't learn like this. I highly advise you to check this blog post out. Read it thoroughly. Trust me. It is truly a big help. https://scriptinghelpers.org/blog/how-to-teach-yourself-lua Also, use the wiki. It sad and unfortunate but a lot of people refuse to use it. It's extremely helpful!
The best thing I ever did when I was learning early on was make something myself. Trust me. The feeling you get when you make something, and YOU made it, is AMAZING.