Help with Placement System

Hello, I’m trying to make a placement system but when I rotate a block it doesn’t get placed in the right spot
Example: Untitled Game - Roblox Studio 2021-12-16 22-25-49
I think it is happening because of this piece of code:

if Surface == Enum.NormalId.Top then
    Position = Target.Position + Vector3.new(0, Snap, 0)
elseif Surface == Enum.NormalId.Bottom then
    Position = Target.Position + Vector3.new(0, -Snap, 0)
elseif Surface == Enum.NormalId.Left then
    Position = Target.Position + Vector3.new(-Snap, 0, 0)
elseif Surface == Enum.NormalId.Right then
    Position = Target.Position + Vector3.new(Snap, 0, 0)
elseif Surface == Enum.NormalId.Front then
    Position = Target.Position + Vector3.new(0, 0, -Snap)
elseif Surface == Enum.NormalId.Back then
    Position = Target.Position + Vector3.new(0, 0, Snap)
end