You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I am trying to add a mesh to my tycoon
- What is the issue? Include screenshots / videos if possible!
keep getting Infinite yield possible on 'Workspace:WaitForChild(“PartStorage”)" and nothing is dropping
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i have looked for solutions and this is my first attempt at making anything to do with roblox im at a loss
wait(2)
workspace:WaitForChild("PartStorage")
meshDrop = true
--------------------
-- Mesh Settings: -- [If you want a mesh drop, set meshDrop to true up on top.]
-- Look at the mesh properties and change the inside of the quotes below to the appropriate
-- full link or the rbxasset:// style, doesnt matter which one you see in the mesh you want
meshID = "rbxassetid://848397473"
textureID = "rbxassetid://848397512"
--------------------
while true do
wait(2) -- How long in between drops
local part = Instance.new("Part",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 = 1 -- How much the drops are worth
part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,5,0)
part.FormFactor = "Custom"
part.Size=Vector3.new(1.056, 1.104, 0.035) -- Size of the drops
if meshDrop == true then
local m = Instance.new("SpecialMesh",part)
m.MeshId = meshID
m.TextureId = textureID
end
part.TopSurface = "Smooth"
part.BottomSurface = "Smooth"
game.Debris:AddItem(part,20) -- How long until the drops expire
end
--[[meshDrop = true
local DropperPartsFolder = script.Parent.Parent.Parent.DropperParts
--------------------
-- Mesh Settings: -- [If you want a mesh drop, set meshDrop to true up on top.]
-- Look at the mesh properties and change the inside of the quotes below to the appropriate
-- full link or the rbxasset:// style, doesnt matter which one you see in the mesh you want
meshID = "rbxassetid://848397473"
textureID = "rbxassetid://848397512"
--------------------
while true do
wait(2) -- How long in between drops
local NewPart = Instance.new("Part",DropperPartsFolder)
local cash = Instance.new("IntValue",part)
local CashValue = Instance.new("NumberValue", NewPart)
CashValue.Value = 1
CashValue.Name = "CashValue"
part.CFrame = script.Parent.SpawnPart.CFrame - Vector3.new(0,5,0)
part.FormFactor = "Custom"
part.Size=Vector3.new(1.056, 1.104, 0.035) -- Size of the drops
if meshDrop == true then
local m = Instance.new("SpecialMesh",part)
m.MeshId = meshID
m.TextureId = textureID
end
end ]]--
this is the code i could get to work to drop ordinary parts
local DropperPartsFolder = script.Parent.Parent.Parent.DropperParts
while wait(2) do
local NewPart = Instance.new("Part",DropperPartsFolder)
NewPart.Position = script.Parent.SpawnPart.Position
NewPart.Size = Vector3.new(1,1,1)
local CashValue = Instance.new("NumberValue", NewPart)
CashValue.Value = 1
CashValue.Name = "CashValue"
end