MouseButton1Down not being detected for a specific TextButton

I have 2 frames, the 2 frames are called “Character1” and “Character2”. Somehow, the Character1’s text button is not being detected whenever it is clicked, but the Character2’s text button is being detected when it is clicked

I have added a print() function when the text button is clicked whenever it is clicked, and it did not print anything.

Gui.CharacterSaves.Character1.LoadChar.MouseButton1Down:Connect(function()
	print('clicked')
	
	--script
end)

I’ve made a loop function, deleted the other code shown above (including the character2’s code), same issue, character1’s text button does not work while character2’s text button does


for i, v in pairs(Gui.CharacterSaves:GetChildren()) do
	if v:IsA("Frame") then

		v.LoadChar.MouseButton1Down:Connect(function()
			if v.LoadChar.Text == "Load Character" then
				LoadChar(v.Slot.Value, "Load")		
			else
				LoadChar(v.Slot.Value, "Create")	
			end
		end)
	end
end

I’ve also made a server script inside the gui and made it print the character1’s name, which does print the frame’s name

script.Parent.CharacterSaves.Character1.Name

I’m very confused, and have no idea why this is happening

You should probably use a textbutton’s .Activated event, as it is better for everything.

Same issue, the character2’s text button is detected while the other is not

You should use TextBox.FocusLost:Connect

https://developer.roblox.com/en-us/api-reference/event/TextBox/FocusLost

Are they perhaps overlapping each other? Like on button is behind the other? Might want to check that if they are, if not I would like a pic of that the buttons look like in game.

unknown

Can you do one like this:
image
It shows the outlines and sizes of the button. I would like one like this. And zoomed out more if you can.

I am not to sure still but you can try the
MouseEnter and MouseLeave method and try to see.


local Button1 = script.Parent.TextButton1

local Button2 = script.Parent.TextButton2

Button1.MouseEnter:Connect(function()

print(“1”)

end)

Button2.MouseEnter:Connect(function()

print(“2”)

end)


Fixed, had to cut the frames and paste them back for whatever reason