Moving the camera whilst right-clicking a Text Button

When you right-click a Text Button, you become unable to move the camera about like so:
https://gyazo.com/afd2e7abbe66a9cbb064615e7627176f

This is causing me a problem as I want users to be able to right-click-camera-drag whilst having this menu open, however the text buttons prevent this. In addition, I can’t remove the text buttons, as they have the ‘.MouseEnter()’ event (unlike text labels) which I need in order to change each commands description.

Is there anyway I can make it so players can drag their camera while right clicking on Text Buttons?

1 Like

Unchecking the “Active” property should do the trick. MouseEnter will still work, or at least it did during my testing.

In a different stuation where Active cannot be unchecked, you can simply resize the TextLabel to the exact space it needs using it’s “TextBounds” property. For example, this would resize “script.Parent” to the size it needs (thus making it so you still can’t move the camera but gives more space to do so):

local textLabel = script.Parent
textLabel.Size = UDim2.new(0, textLabel.TextBounds.X, 0, textLabel.TextBounds.Y)

(edit: Why are you using TextButtons for this? TextLabels should work just fine, too, and probably are more efficient for the situation at hand)

1 Like

Unlike other admins, the HD Admin commands list does not give a pop up description of each command as your drag your mouse over each one. I am basically in the process of making my own right now. Ive completed the majority of it, however in order for the description (text) to change as the mouse moves to a different command, I need to use the .MouseEnter property, which is only in TextButtons, not TextLabels.

Adding text bounds to it won’t work either, as I need the TextButton to cover the whole length of the frame. I made it slightly short in the gif above for testing.

Also, I unchecked Active but it didn’t work

With-in the properties of the button/label you are using there is an “Active” (Probably ticked for you.), this should fix your issue.

Turns out you can use .MouseEnter on a TextLabel after, so problem solved! Thanks for your answers though

2 Likes