How Can I Show Cloned Block Position?
I want to show a cloned block before placed. How can I fix this script?
02 | local playerMouse = game.Players.LocalPlayer:GetMouse() |
08 | script.Parent.Equipped:Connect( function (build) |
11 | if game.Workspace.GameRunning.Value = = true then |
12 | while script.Parent.Unequipped do |
14 | local CBlock = game.Workspace.Block:Clone() |
17 | CBlock.Parent = game.Workspace |
21 | CBlock.Position = Vector 3. new((math.floor(playerMouse.Hit.X / Gridsize ) * Gridsize),(math.floor(playerMouse.Hit.Y / Gridsize + 0.5 ) * Gridsize) , (math.floor(playerMouse.Hit.Z / Gridsize ) * Gridsize)) |
23 | build.Button 1 Down:Connect( function () |
25 | CBlock.CFrame = CFrame.new((math.floor(playerMouse.Hit.X / Gridsize ) * Gridsize) , (math.floor(playerMouse.Hit.Y / Gridsize + 0.5 ) * Gridsize) , (math.floor(playerMouse.Hit.Z / Gridsize ) * Gridsize)) |