Ui button isnt detecting if mouse entered into ui button on plugin

this is my issue isnt detecting

and its that code

SwipeBar.DETECTION.MouseEnter:Connect(function()
	MouseEnterBoolean = true
	print(MouseEnterBoolean)
end)

SwipeBar.DETECTION.MouseLeave:Connect(function()
	MouseEnterBoolean = false
	print(MouseEnterBoolean)
end)

and its large (detection button)

1 Like

Are you cloning your UI elements into the docking widget? If so, it might be that your functions are linked to the original button instead of the user’s button from the widget.

thats can effect swipe script?

swipebar script* i forgot that

For example, if you make a function linked to the detector but then in order to give the user the UI you clone the detector into the widget, that function you made will be linked to the original detector instead of the new detector you created by cloning.

Same thing applies if you clone SwipeBar.
You have SwipeBar defined as script.SwipeTool.Value
If you clone SwipeBar, then your reference SwipeBar is the original UI and the TextButton is being located inside the original UI instead of the new clone.

You can redefine your SwipeBar variable after you’ve cloned everything so you’re referencing the clone instead of the original.

(This is all assuming you are cloning the UI elements into the docking widget)

1 Like