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

So, how would I make a tool that creates a brick at the spot I click?

I dont need a full script or anything. I would like to know how to exactly spawn a brick at the given spot a player clicks.

player = game.Players.LocalPlayer
mouse = player:GetMouse()

mouse.Button1Down:connect(function(click)
-- stuf?
end)

1 answer

✓ Accepted answer

Use mouse.Hit, it returns the CFrame position value of the mouse, then you can clone the part to that CFrame position.

player = game.Players.LocalPlayer
mouse = player:GetMouse()

mouse.Button1Down:connect(function(click)
	x = Instance.new("Part", game.Workspace)
	--Part customization stuff
	x.CFrame = mouse.Hit
end)

2 comments

0

Sweet thanks so much!

0

No problem!

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