How the script works: there is a part welded to you (the player), the script is inside of the part and the part has two billboard guis inside which both contain one ImageLabel. All of this makes the bbguis attach to the player. script and more details below.
local camera = game.Workspace.CurrentCamera
local humanoid = script.Parent.Parent:FindFirstChild("Humanoid")
local Back2 = script.Parent.Back2.Back2 --billboardgui 1
local Front2 = script.Parent.Front2.Front2 --billboardgui 2
function Test(disabled)
if (humanoid.MoveDirection:Dot(camera.CFrame.LookVector) < 0) then --when the player runs upwards or to the right, back2 is no longer visible and front2 becomes visible.
Back2.Visible = false and Front2.Visible == true
else
if (humanoid.MoveDirection:Dot(camera.CFrame.YVector) > 0) then ----when the player runs downwards or left, front2 is no longer visible and back2 becomes visible.
Front2.Visible = false and Back2.Visible == true
end
end
end
humanoid.Running:Connect(Test)
The issue happens when both billboardguis are disabled because the player moved around in both the RightVector and XVector. This I want to avoid, I wanted the bbguis to switch back and forth from being enabled and disabled depending on where the player walks making only one disabled at a time..how can this be done?

6 comments
It currently disables both of the guis permanently when the player walks in all possible directions. I want the guis to switch back and forth from being disabled and enabled depending on which direction the player walks. Making it so they don't disable permanently
how does the above disable them both ? it enables one and disalbes one ?
It disables them both because when it detects that the player walked in the (LookVector, meaning they walked upwards or right in my case) the first gui is no longer visible and the second one becomes visible. If the player was to walk in the opposite direction (YVector, meaning they walked downwards or left) all guis become disabled. and Vice Versa for the other gui.
im talking about my code that i posted, which does this when you walk in the lookvector, enables front2 and disables back2, then you walk the opposite and now it makes front2 invisible and the back2
visibleThere were some extra equal signs so I was kinda getting confused. Thank you for your help !
Oh mb, i forgot to remove them! glad it worked