So, I am trying to check to see if a button is at a positon, if not place it, but it doesn’t seem to work as I planned, it is placing 2 buttons at the position and I found out that when I print
print(PlayerGui:GetGuiObjectsAtPosition(Button1Location.X.Offset, Button1Location.Y.Offset)[1])
it returns nil, help appreciated
if PlayerGui:GetGuiObjectsAtPosition(Button1Location.X.Offset, Button1Location.Y.Offset)[0] == nil then
UI.Position = Button1Location
UI.Visible = true
print(PlayerGui:GetGuiObjectsAtPosition(Button1Location.X.Offset, Button1Location.Y.Offset)[1])