befsios
(zbef)
May 31, 2025, 11:24am
1
sometimes when i press mouse button 1, GPE is true and i can’t click any buttons.
it activates some kinda state and i have to press right click → left click (quickly otherwise it doesn’t work ?!?!?)
what makes it weirder is that sometimes it switches around then m2 doesnt work
i’ve tried using this in the command bar to test the GPE thing
game:GetService("UserInputService").InputBegan:Connect(function(input,gpe)
print(input.UserInputType,gpe)
end)
m1 state
m2 state
EDIT:
i’ve narrowed it down to a specific area, im not so sure about it being script related anymore
EDIT:
turns out i had proximity prompts inside of the trees, and their keycode was Unknown
1 Like
try using a different method such as :GetMouse()
with .Button1Down
etc.
iGottic
(iGottic)
May 31, 2025, 1:59pm
3
Your issue is that you ran it in the command bar.
UserInputService
captures input in the viewport, meaning it will not detect input under either of the following circumstances:
The window is not focused
You do not click in the viewport
In a game, this is not a problem, since you will always be playing in the viewport.
befsios
(zbef)
May 31, 2025, 4:58pm
4
yes but the main issue is that i can’t click on ui buttons
befsios
(zbef)
May 31, 2025, 5:03pm
5
i still cannot click buttons / whatever ingame
iGottic
(iGottic)
May 31, 2025, 10:22pm
6
Are you running it from the command bar? If so, don’t do that, that would be the issue.
Wait a second won’t that memory leak
befsios
(zbef)
June 1, 2025, 9:35am
8
the command bar was just for testing if GPE was true, i didnt use it for the actual buttons.
befsios
(zbef)
June 1, 2025, 9:35am
9
i’m pretty sure it clears after playtest
2112Jay
(2112Jay)
June 1, 2025, 9:50am
10
Why do you script like this?
game:GetService(“UserInputService”).InputBegan:Connect(function(input,gpe)
This all on one line is a bad habit.
Do any ScreenGui elements have Active = true and are layered over everything?
That may be the problem.
befsios
(zbef)
June 1, 2025, 12:40pm
11
i only do this in command bar lol
all ui elements are Active and nothing is layered over them. i have also tested in billboardgui buttons and they also require the 2 click thing
befsios
(zbef)
June 1, 2025, 3:24pm
12
proximity prompts!! turns out i had them on keycode unknown, which actually triggers from m1 and m2.
1 Like
2112Jay
(2112Jay)
June 1, 2025, 3:27pm
13
Well, that makes sense then. I just keep seeing this in many other posts.
I’m not sure these are 100% trustworthy from a command bar test. This does seem very odd. I wish I could reproduce your error here. All I can think of is that something must be getting in the way somehow.
2112Jay
(2112Jay)
June 1, 2025, 3:46pm
14
What a nightmare to debug something like that. I see why you were trying everything now.
system
(system)
Closed
June 15, 2025, 3:46pm
15
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.