I’m trying to produce a simple button that spawns the player into the game when they press a button. For keyboard the key is Spacebar, and for gamepad it’s ButtonA. Keyboard works fine, but ButtonA won’t trigger at all. Using other buttons like ButtonX will work.
I assume it’s due to some core priority binding not sinking, so far I’ve tried unbinding the default jump (which uses ButtonA) but it still won’t work.
function Confirm()
script.Parent.StartButton.Button.Position = UDim2.fromScale(0.5,0.425)
script.Parent.StartButton.Button.TextColor3 = Color3.fromHSV(0,0,1)
script.Parent.StartButton.Button.Visible = false
script.Parent.StartButton.Loading.Visible = true
game.Workspace.Events.Game.SpawnCharacter:InvokeServer()
repeat game:GetService("RunService").RenderStepped:Wait() until p.Character
script.Parent:Destroy()
end
function ConfirmContextAction(action: string, input_state: Enum.UserInputState, input: InputObject)
print(input_state)
if input_state == Enum.UserInputState.End then
Confirm()
end
end
cas:BindActionAtPriority("UIConfirm_Start",ConfirmContextAction,5000,false,Enum.KeyCode.Space,Enum.KeyCode.ButtonA)
(Pressing ButtonA won’t even print an input state, and yes my controller does work! I can jump using my custom jump system with ButtonA when spawned in.)