local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local Players = game:GetService("Players") local Building = false local Mouse = Players.LocalPlayer:GetMouse() local Brick = script.Part local function RoundVector3(vector: Vector3) return Vector3.new( math.floor(vector.X), math.floor(vector.Y), math.floor(vector.Z) ) end UserInputService.InputBegan:Connect(function(key, gp) if gp then return end if key.KeyCode == Enum.KeyCode.B then Building = not Building if Building then Brick.Parent = workspace.Building return end Brick.Parent = script return end end) RunService.RenderStepped:Connect(function() if not Building then return end local target = Mouse.Target if not target then return end local position = RoundVector3(Mouse.Hit.Position) Brick.Transparency = .5 Brick.Position = RoundVector3(position) print(position) end) Mouse.Button1Down:Connect(function() if not Building then return end local target = Mouse.Target if not target then return end local clone = Brick:Clone() clone.Parent = workspace clone.Transparency = 0 end)