Hello,
A bit of a conceptual one today.
Essentially, I’m trying to make a sonar device for players to use. When they press the ‘E’ key on their keyboard, a pinging sound plays locally, and a script checks to see if there are any collectable items nearby.
Currently, I’m trying to make all of this happen via the localscript that wires the keybind to the action, but I’m wondering if that’s not possible to achieve with a localscript.
local function handleAction(actionName, inputState, inputObject)
-- this is a localscript
-- could the above be done using code that is executed inside of here?
end
ContextActionService:BindAction(ACTION_PING, handleAction, true, Enum.KeyCode.E)
Thanks for any and all help, and let me know if you need any more info.