It's basically a Basketball that when you press the key "E", it's supposed to shoot the ball (which works) , it's just it does it no matter what situation you're in, as in like if you type, it'll do shoot the ball, here's the script I just need it to be only from when you're not typing.
uis.InputBegan:connect(function(input,gameProcessedEvent) if input.KeyCode == Enum.KeyCode.E or input.KeyCode == Enum.KeyCode.ButtonX then
Basically, I want this to run this when you're not typing, and I really don't know how to check if the player is typing, all I know is that it belongs somewhere in the if statement.
That's what the gameProcessedEvent
argument is for. It is true
if the user is typing in a textbox or such. You need to exit your function when that argument is true, like so:
uis.InputBegan:Connect(function(input,gameProcessedEvent) if gameProcessedEvent then return end --rest of the code end)
(also make sure to use :Connect()
, not :connect()
;) )