Say for example I have these buttons:
Currently, I have:
mouse button1press connect function
if pressed == selectButton then
ContextActionService:BindAction()
elseif pressed = moveButton then
so on and so forth
Is there a better way of doing this? Thanks!
1 Like
JustCrock
(JustCrock)
December 9, 2024, 5:10pm
#2
The best way of doing this would probably be detecting it for the buttons themselves.
local selectButton = yourSelectButton
local moveButton = yourMoveButton
selectButton.Activated:Connect(function()
-- whatever functionality
end)
moveButton.Activated:Connect(function()
-- whatever functionality
end)
This is just a bit more of a standard practice.