game.ReplicatedStorage.Build.OnServerEvent:Connect(function(player,mouseX,mouseY,mouseZ)
    
    local function round(x, n)
           return math.floor(x/n+0.5) * n
    end
    
    local block = Instance.new("Part")
    
    block.Name = "BlockPlaced"
    block.Size = Vector3.new(4,4,4)
    block.Anchored = true
    block.Position = Vector3.new(math.floor(round(mouseX,4)),math.floor(round(mouseY,4)),math.floor(round(mouseZ,4)))
    block.Parent = workspace
    
end)

so i have a basic building system but when i try to place on the sides, it goes inside of the other block and that needs to be fixed so yeah plz help

https://gyazo.com/16b1bd09ad12d7019c14f104d60ae167

1 comment

0