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

How to make tool that creates a brick?

so, in this question, I'm kinda asking to learn how to make it so that when I click with the tool equipped, it creates a brick where the player is standing.

  • just teaching me what to use/do is fine(I wish to learn), but a complete script is always welcome lol.

1 answer

✓ Accepted answer

Like this. This is a server script in the tool

local tool = script.Parent
local mouse

tool.Equipped:Connect(function(m)
	mouse = m
end)

tool.Activated:Connect(function()
	if mouse then
		local Part = Instance.new("Part",workspace)
		Part.Position = mouse.Hit.P
		--Anything else you ant to do with the part
	end
end)

More documentation on tools can be found here

3 comments

0

pretty sure that'll work

0

if it does can you accept the answer?

0

lol he wasn't the one who asked it, it was me lol. but either way thanks, I must also thank you for giving me extra help for finding info on tools.

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