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

How do you make a a Tool that Places Blocks?

Asked by 7 years ago

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.

1 answer

Log in to vote
0
Answered by
farrizbb 465 Moderation Voter
7 years ago

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)

Ad

Answer this question