Player = game.Players.LocalPlayer
mouse = Player:GetMouse()
CB = script.Parent
function placeBlock()
x = Instance.new("Part", game.Workspace)
x.Name = "IronBlock"
x.Material = "Metal"
x.Size = Vector3.new(4, 4, 4)
x.Friction = 0.3
x.Shape = "Block"
x.FormFactor = Custom
x.CFrame = CFrame.new(x.Position,mouse.Hit.p)
end
CB.Activated:connect(placeBlock)
Basically this is in a Localscript,And the local script is inside a tool. I want it to spawn the block wherever the player's mouse is facing,Could anybody help?
