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 9 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)

function onClicked(m)
while hold do
newp = Instance.new("Part", workspace)
newp.Size = Vector3.new(0.1, 0.1, 0.1)
newp.Anchored = true
newp.BrickColor = BrickColor.new(0, 0, 0)
pcall(function()
newp.CFrame = m.Hit
end)
wait()
end
end

hpb.Selected:connect(function(m)
m.Button1Down:connect(function() hold = true onClicked(m) end)
m.Button1Up:connect(function() hold= false end)
end)

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 — 9y
0
thanks! this worked. broetchen 0 — 9y

Answer this question