How would i go about making a block drop an item, for example if you break a tree it drops logs and rocks drop minerals etc etc.
thanks in advance, Benmz41998
How would i go about making a block drop an item, for example if you break a tree it drops logs and rocks drop minerals etc etc.
thanks in advance, Benmz41998
You can clone the "drop" item near the location of the "dropper".
e.g.
local drop = game.ReplicatedStorage.WoodDrop
local r = math.random --To shorten the code
--something happens
local d = drop:Clone(); --Clone item
local origin; --Define cframe of area to clone
local offset = CFrame.new(r(-5,5),5,r(-5,5)); --Define offset
d.CFrame = origin * offset;
d.Parent = workspace;
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
EYYYYYYYY ITS GOULSTEM