Changing input at runtime

I’ve been trying all day to create a system without using a plugin to change Input mappings at runtime. Right now the Image is what I have to change on of the values, but it’s obviously not working.

Note: I am aware the Integers in RemoveIndex and Insert are different, I was seeing if maybe that was the issue.

Edit: redid the function so now This is the function, right now it is able to set the new input, but the old one is still there