Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you make a a Tool that Places Blocks?

Alright. I'm trying to create my own custom stamper tool. (It's a tool that lets you build) So everytime I equip the tool, a block appears. As you move the mouse, the block moves along with it.

So here's the question, how do you make the block move +1 stud everytime the mouse moves? In other words, when you move your mouse left, you do you make it so that the block moves 1 stud left?

Here's my current script:

function Equip()
mouse = game.Players.localPlayer:GetMouse()

local newPart = instance.new("Part",game.workspace)
newPart.Name = "Block"
newPart.Size = Vector3.new(4,4,4)

mouse.Move:connect(function()
newPart.Position = mouse.Hit.p
end)
end

thanks, text.

2 comments

0

For that, I recommend this tutorial: http://wiki.roblox.com/index.php?title=Tools

1 answer

✓ Accepted answer

i'll just word it to you since you seem to know a bit about scripting.Use a repeat loop and do Part.CFrame = mouse.hit(assuming you have variables)

This discussion is preserved as it was. New answers, comments, and votes are closed.