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

I want to make these "Droppers" (Tycoon game) drop meshes instead of plain blocks, How?

Asked by
Cat348 0
8 years ago

It should take the mesh out of the script and apply it to the block, There are two dropper types, Manual click and auto, I've tried actually doing it myself but it just tends to break.

I'm also not sure how to make the part be right side up, (Tried to do part.rotation = (0,0,0) or something, but it also didn't work.

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 23 lines...
01wait(2)
02workspace:WaitForChild("PartStorage")
03 
04while true do
05    wait(1.5) -- How long in between drops
06    local part = Instance.new("Part",workspace.PartStorage)
07    part.BrickColor=script.Parent.Parent.Parent.DropColor.Value
08    part.Material=script.Parent.Parent.Parent.MaterialValue.Value
09    local cash = Instance.new("IntValue",part)
10    cash.Name = "Cash"
11    cash.Value = 5 -- How much the drops are worth
12    part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1.4,0)
13    part.FormFactor = "Custom"
14    part.Size=Vector3.new(1.2, 1.2, 1.2) -- Size of the drops
15    part.TopSurface = "Smooth"
16    part.BottomSurface = "Smooth"
17end

1 answer

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

Hey, i think it should work with this script.

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

Also i think you have to change this line to make part on the right side:

1part.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1.3,0)

I mean of course change numbers in Vector3.new(0,1.3,0) I hope it will help you.

Ad

Answer this question