Hi, I'm currently working on a tycoon project and I would like assistance with transforming this script to be able to drop meshes instead of parts, all help is greatly appreciated! Thanks :).
wait(2) workspace:WaitForChild("PartStorage") while true do wait(1.5) local part = Instance.new("Part",workspace.PartStorage) part.BrickColor=script.Parent.Parent.Parent.DropColor.Value part.Material=script.Parent.Parent.Parent.MaterialValue.Value local Robux = Instance.new("IntValue",part) Robux.Name = "Robux" Robux.Value = 2 part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1.4,0) part.FormFactor = "Custom" part.Size=Vector3.new(2, 0.2, 0.8) part.TopSurface = "Smooth" part.BottomSurface = "Smooth" game.Debris:AddItem(part,20) end
wait(2) workspace:WaitForChild("PartStorage") while wait(1.5) do -- I would recommend using `while wait() do` loop for this to happen every 1.5 secs -- part properties local part = Instance.new("Part",workspace.PartStorage) part.BrickColor=script.Parent.Parent.Parent.DropColor.Value part.Material=script.Parent.Parent.Parent.MaterialValue.Value part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1.4,0) part.FormFactor = "Custom" part.Size = Vector3.new(2, 0.2, 0.8) part.TopSurface = "Smooth" part.BottomSurface = "Smooth" -- mesh local mesh = Instance.new('SpecialMesh',part) -- Adds the mesh to the part mesh.MeshType = 'FileMesh' mesh.MeshId = '' -- id of mesh mesh.TextureId = '' -- texture id mesh.Scale = Vector3.new(1,1,1) -- how big you want the mesh to be -- robux local Robux = Instance.new("IntValue",part) Robux.Name = "Robux" Robux.Value = 2 game.Debris:AddItem(part,20) end
local mesh = Instance.new("Mesh") mesh.MeshId = "" --Your mesh here mesh.Parent = part