Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make a dropper that drops a MeshPart? (Just so i'm clear, not "mesh" a "MeshPart")

Asked by 5 years ago
Edited 5 years ago
wait(2)
workspace:WaitForChild("PartStorage")



meshDrop = true
--------------------
meshID = "rbxassetid://547028155"  
textureID = ""
--------------------


while true do
    wait(1.5) -- How long in between drops
**  local part = Instance.new("MeshPart",workspace.PartStorage)**
    --part.BrickColor=script.Parent.Parent.Parent.DropColor.Value
    --part.Material=script.Parent.Parent.Parent.MaterialValue.Value
    local cash = Instance.new("IntValue",part)
    cash.Name = "Cash"
    cash.Value = 5 -- How much the drops are worth
    part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,2,0)
    part.BrickColor = BrickColor.new("Navy blue")
    part.Material = Enum.Material.Glass
    part.Size=Vector3.new(-271.365, 60.291, -237.789) -- Size of the drops
    if meshDrop == true then
    part.MeshId = meshID
    part.TextureId = textureID
    end
    part.TopSurface = "Smooth"
    part.BottomSurface = "Smooth"
    game.Debris:AddItem(part,20) -- How long until the drops expire
end

tried using a meshID, but is just gives me this error 19:57:09.955 - Unable to assign property MeshId. Script write access is restricted

tried putting Mesh Part into workspace and changing this: local part = Instance.new("MeshPart",workspace.PartStorage)

to this:~~~~~~~~~~~~~~~~~ local part = game.workspace.Gem:Clone()
~~~~~~~~~~~~~~~~~

but nothing comes out of the dropper. So can someone please help? Thanks in Advance

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

sry for bad english btw

You cannot set the MeshId

There is one way :

You could add a MeshPart to (example : ReplicatedFirst or wherever you want) And clone it

wait(2)
workspace:WaitForChild("PartStorage")



meshDrop = true
--------------------
--meshID = "rbxassetid://547028155"  
--textureID = ""
--------------------


while true do
    wait(1.5) -- How long in between drops
 local part = game.ReplicatedStorage.MeshPart:Clone() --Where you added the MeshPart
    --part.BrickColor=script.Parent.Parent.Parent.DropColor.Value
    --part.Material=script.Parent.Parent.Parent.MaterialValue.Value
    local cash = Instance.new("IntValue",part)
    cash.Name = "Cash"
    cash.Value = 5 -- How much the drops are worth
    part.Parent = game.Workspace --Else you cant see it lol
    part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,2,0)
    part.BrickColor = BrickColor.new("Navy blue")
    part.Material = Enum.Material.Glass
    part.Size=Vector3.new(-271.365, 60.291, -237.789) -- Size of the drops
    if meshDrop == true then
  --  part.MeshId = meshID
   -- part.TextureId = textureID
    end
    part.TopSurface = "Smooth"
    part.BottomSurface = "Smooth"
    game.Debris:AddItem(part,20) -- How long until the drops expire
end
0
I edited line 15 : Replace it where u stored the part , and i added a new line : line 21 : I set the parent of the cloned part to workspace so you can see it, if its not in the workspace you cant see it! :D itz_rennox 412 — 5y
0
Thanks, it worked ShineBright2775 30 — 5y
0
no problem :D itz_rennox 412 — 5y
Ad

Answer this question