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

Help in making a paint tool?

Asked by 10 years ago

Hi SH,

I've been trying to make a HopperBin, that on selected, one is able to click and drag across the screen, leaving a trail of black, tiny blocks. (to simulate drawing)

01function onClicked(m)
02while hold do
03newp = Instance.new("Part", workspace)
04newp.Size = Vector3.new(0.1, 0.1, 0.1)
05newp.Anchored = true
06newp.BrickColor = BrickColor.new(0, 0, 0)
07pcall(function()
08newp.CFrame = m.Hit
09end)
10wait()
11end
12end
13 
14hpb.Selected:connect(function(m)
15m.Button1Down:connect(function() hold = true onClicked(m) end)
16m.Button1Up:connect(function() hold= false end)
17end)

I really have no idea what's going on, I'm trying to make a paint tool, and it just won't work! Any ideas?

0
Check if the parts are being created at all. If they are, then the parts are too small or are inside of the part the mouse.Hit is in. Tkdriverx 514 — 10y
0
thanks! this worked. broetchen 0 — 10y

Answer this question