I am new in this and I can’t find a working solution,
I use this script:
“wait(2)
workspace:WaitForChild(“PartStorage”)
while true do
wait(1.5) – 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 = 5 – How much the drops are worth
part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1.4,0)
part.FormFactor = “Custom”
part.Size=Vector3.new(1.2, 1.2, 1.2) – Size of the drops
part.TopSurface = “Smooth”
part.BottomSurface = “Smooth”
game.Debris:AddItem(part,20) – How long until the drops expire
end”
Set the part’s Anchored property to false. Also, please put your code in code blocks by putting 3 backticks at the beginning and end. As well, no need to set the TopSurface/BottomSurface as that is deprecated and is default smooth.
How about visually creating the item and put it in the replicated storage. Then you can do
local ClonePart = game.ReplicatedStorage.PartName:Clone()
ClonePart.Parent = game.Workspace.PartStorage
--complete this part where you teleport the part to your desired position and other things you want to add
wait(2)
workspace:WaitForChild("PartStorage")
while true do
wait(1.5) -- 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 = 5 -- How much the drops are worth
cash.Parent = part
part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0, 1.4, 0)
--part.FormFactor = "Custom" -- deprecated
part.Size = Vector3.new(1.2, 1.2, 1.2) -- Size of the drops
part.TopSurface = "Smooth"
part.BottomSurface = "Smooth"
game.Debris:AddItem(part, 20) -- How long until the drops expire
end