Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how can i make a dropper drop a roblox model not just a block?

Asked by
techan0 -12
7 years ago
Edited 7 years ago

here is the code im using i just need it to drop a model (to be exact the model i want is https://web.roblox.com/library/22097287/MicroChip ) in roblox other then just a block.

01wait(2)
02workspace:WaitForChild("PartStorage")
03 
04 
05deb = true
06script.Parent.Clicker.ClickDetector.MouseClick:connect(function(wat)
07    if deb == true then
08        deb = false
09            local part = Instance.new("Part",workspace.PartStorage)
10            part.BrickColor=script.Parent.Parent.Parent.DropColor.Value
11            part.Material=script.Parent.Parent.Parent.MaterialValue.Value
12            local cash = Instance.new("IntValue",part)
13            cash.Name = "Cash"
14            cash.Value = 1 -- How much the drops are worth
15            part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1.3,0)
View all 24 lines...

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

I would recommend putting the model you've made into game.ServerStorage, when you want to use it use the follow code.

01local ServerStorage = game.ServerStorage -- Serverstorage
02local model = ServerStorage.Model -- Replace with modelname
03 
04 
05script.Parent.MouseClick:connect(function()
06    local DropClone = model:Clone() -- Clones model
07    local Worth = Instance.new("NumberValue", model)-- How much the model is worth.
08    Worth.Name = "Worth"
09    Worth.Value = 200
10    DropClone.Name = "DropC" -- Names model
11    DropClone.Parent = workspace -- Puts model in workspace
12    DropClone:MoveTo(workspace.Dropper.Position) -- Dropper
13end)
14 
15 
View all 23 lines...

If it doesn't work or if you do have questions please ask em!

~ Arthenix

0
how would i add the price for each drop when it makes it to the end? techan0 -12 — 7y
0
Made a endpart script. DjinoKip 78 — 7y
Ad

Answer this question