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:
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
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
Only If you care at all about performance
here it does not say that this deprecated yet. Anyway, at this time, when you create a part with Instance.new()
the TopSurface
and BottomSurface
are not Smooth
by default.
The way you would be able to let a dropper drop a model is the following:
- In the model, weld all the parts together and unanchor them.
- “Drop” the primary part.
I’ve created a module that can be used to drop a model. you can access it here and use the drop function.