player = game.Players.LocalPlayer
mouse = player:GetMouse()
--clicky = game.Workspace.placey
tool = script.Parent
local function onEquip()
brick = Instance.new("Part",game.Workspace)
brick.BrickColor = BrickColor.new("Really red")
brick.Name = "movin"
brick.Size = Vector3.new(3,0,3)
brick.Transparency = .6
brick.CanCollide = false
brick.BottomSurface = "Smooth"
brick.TopSurface = "Smooth"
brick.Shape = "Block"
brick.Anchored = true
mouse.TargetFilter = brick
mouse.Move:connect(function()
if mouse then
brick.CFrame = CFrame.new(mouse.Hit.X, mouse.Hit.Y, mouse.Hit.Z)
--brick.Rotation = Vector3.new(0,0,-90)
end
end)
end
tool.Equipped:connect(onEquip)
tool.Unequipped:connect(function()
brick:Destroy()
end)
whenever i select a tool, it makes a part, and has all the properties i want working correctly. the part follows my mouse. the only problem is that the player flips onto their head, and cant move whenver you select the tool. what do i do about this?

2 comments
why not make it so that it freezes the player (anchors) when they pull the tool out for like 2 seconds and then the player unfreezes.
doesn't help. just delays the inevitable