How can i place a part based on where the mouse is ? I want the player to place parts in the game world based on where the mouse is ? but how do i do that ? I wanted to have some script to show but i have no idea where to start :/
✓ ANSWER ACCEPTED
How can i place a part based on where the mouse is ?
1 answer
✓ Accepted answer
mouse.Hit is the CFrame of where the mouse is pointing
mouse.Hit.p is just mouse.Hit but in a Vector3
mouse = game.Players.LocalPlayer:GetMouse() -- this will get the mouse, and has to be localscript
mouse.Button1Down:connect(function() -- button1down fires when the left mouse button is put into a down state
local part = Instance.new("Part" , workspace) --makes the part
part.Position = mouse.Hit.p -- and here is the mouse coming in
end)
for more stuff on the mouse, go to the wiki page for mouse
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
thanks so much, i did a script just like that but did it in a Script not a LocalScript.
oh, well when using game.PLayers.LocalPlayer, you need a local script, and when using the mouse.