How can i let a dropper drop a model?

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”

Can anybody help me?

Instead of setting CFrame, try setting the Position.

Than it still don’t drop a model instead of a Brick

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.

Lastly, I would recommend reading this:

3 Likes

What exactly do you mean? What I meant was this

part.Position = Vector3.new(script.Parent.Drop.Position.X, script.Parent.Drop.Position.Y - 1.4, script.Parent.Drop.Position.Z)

It should be automatically false.

What i used before was a mesh but i can’t adjust the size of that.

That shouldn’t matter, because I’m not talking about adjusting size.

You have to weld the model together using WeldConstraints and then choosing the most middle-placed part, and name that to Middle.

it is an union from the workshop so i can’t seperate it

If its a union then it should be easy to

Vector3.new()
--or
CFrame.new()

The Union.

yes but how can i let it drop the model, that’s not yet in the script

So are you dropping a model or a union?

You can do

--Other parts of the script assuming you already cloned it
VariableName.CFrame = CFrame.new(x,y,z)
--or
VariableName.Position = Vector3.new(x,y,z)

the script now is to drop one regular block, that is what i meant

Then you want to BlockName.Anchored = false after you moved it to the position you want

than it is still de same because it drops no union because it is not in the script yet, see above

1 Like

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

i will try it thanks

This should work:

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