function FaceToAxis(face)
if face == Enum.NormalId.Front then
local axis = "Z"
local direction = 1
elseif face == Enum.NormalId.Back then
local axis = "Z"
local direction = -1
elseif face == Enum.NormalId.Left then
local axis = "X"
local direction = 1
elseif face == Enum.NormalId.Right then
local axis = "X"
local direction = -1
elseif face == Enum.NormalId.Top then
local axis = "Y"
local direction = 1
elseif face == Enum.NormalId.Bottom then
local axis = "Y"
local direction = -1
end
return axis, direction
end
It always returns nil and nil. I'm calling the function with the Face value of a SurfaceGui. If I print face then it tells me it is infact Enum.NormalId.Front.
Whats wrong here?

3 comments
I already have done that before any other code in my script, the problem is that it isnt detecting when face is one of the options.
That piece of code works perfectly on my end.
It detects if face equals one of the options?