Alright so I'm trying to get a block to place at the end of a block, Visual: http://prntscr.com/89p4yf
So as you can see in the ms.Paint visual, I need the block at the very end of the brick, here is what I have so far:
Another problem I can see happening is that on some bricks, the Z axis for size doesn't always mean it's in the Z axis for position, if that makes any sense.
--Determines where the block will be place VVV
function determinexyzscales(partname)
local mainspot = game.Workspace.Map.Walls[partname].SpotBrick
mainspot.Size = Vector3.new(1,1,1)
mainspot.CFrame = mainspot.Parent.CFrame
local xsize = mainspot.Parent.Size.X
local z = mainspot.Parent.Position.Z
local zsiz = mainspot.Parent.Size.Z
z = z + zsiz
local zpos = mainspot:Clone()
zpos.Parent = mainspot.Parent
zpos.Name = "ZPOSBRICK"
zpos.CFrame = partname.CFrame * CFrame.new(0, 0, partname.Size.Z / 2)
print("moved"..partname)
end
wait()
--Makes the brick VVVV
for i, v in pairs (walls) do
local SpotBrick = Instance.new("Part")
SpotBrick.Anchored = true
SpotBrick.Parent = v
SpotBrick.Name = "SpotBrick"
SpotBrick.Transparency = .5
determinexyzscales(v.Name)
end

2 comments
I'm confused. Isn't
zpos.CFramealready what you are asking for?It's making it a weird thing, it's taking diffrent axis's or somethin