I want to make a tycoonish game with droppers that will drop coins. But then I have the coin mesh but I have no idea how to create a new part and quickly add a mesh to it. Help please?
✓ ANSWER ACCEPTED
Is it possible to do Instance.new then quickly insert a mesh to the new part?
1 answer
✓ Accepted answer
Yes. Simply use Instance.new to create the Part, and the Mesh - and then edit their Properties to your need.
local coin = game.ReplicatedStorage.Coin; --Reference coin
local coinMesh = coin.Mesh.MeshId; --Get coin's meshid
local p = Instance.new("Part"); --Create new part
p.Size = Vector3.new(1,1,1); --Edit properties
p.CFrame = CFrame.new(0,10,0);
p.Transparency = .5;
local m = Instance.new("SpecialMesh",coin); --Create new mesh
m.MeshId = coinMesh --Set MeshId to coin's mesh
p.Parent = workspace; --Parent the new 'coin'
This discussion is preserved as it was. New answers, comments, and votes are closed.
