I am currently creating a tycoon game with droppers, here is the code within a specific dropper:
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
local cash = Instance.new("IntValue",part)
cash.Name = "Cash"
cash.Value = 3
part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1,0)
local mesh = Instance.new("SpecialMesh", part)
mesh.MeshType = "FileMesh"
mesh.MeshId = "rbxassetid://57718450"
mesh.TextureId = "rbxassetid://139677274"
part.TopSurface = "Smooth"
part.Size = Vector3.new(1,1,1)
part.Rotation = Vector3.new(-0,-0,0)
game.Debris:AddItem(part,20)
wait(.15)
deb = true
end
end)
My question is, how would I make the mesh.MeshId use a model that is within the game, not one that is taken from the roblox website (a roblox asset).
I would imagine it would look something like:
mesh.MeshId = script.Parent.DropModel
(But I know this is wrong) I am pretty new to scripting so if you could explain in detail it would be helpful, thanks!

1 comment
Thanks for the answer, I'm gonna create another question that uses parts instead.