Categories > Coding > Lua >

Press GUI button

Posts: 20

Threads: 13

Joined: Jun, 2023

Reputation: 0

Posted

I'm trying to do smth like this - but it didn't working for me.

 
local Button = game:GetService("Players").ars899.PlayerGui.GameGUI.Multiplier.Reset

local firesignal = function(signal, arg2)
    if getconnections(signal) then
        firesignal(signal, arg2)
    end
end

firesignal(Button.MouseButton1Click, game:GetService('Players').LocalPlayer)

Comments

EggEnthusiast 5 Reputation

Commented

The game might be using another event instead of .MouseButton1Click. Using .MouseButton1Down is a common alternative to .MouseButton1Click, but it may be using something less common like .MouseButton1Up or .Activated. You should decompile the script controlling the button (if possible, i'm not sure if any decompilers are working right now) and that'll tell you which event it is using.

 

GuiButton event docs:

https://create.roblox.com/docs/reference/engine/classes/GuiButton

  • 0

  • 0

Posts: 1227

Threads: 68

Joined: May, 2022

Reputation: 17

Replied

Not every game uses MouseButton1Click, try using "Activated" or other events, check the roblox docs

  • 0

Did I mention I use arch btw?

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )