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)
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)
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)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Sweet thanks so much!
No problem!