Objects are not created instantly. If you call a function to create a new object instance, this instance won't be available until the end of the event.
There are two ways to fix it:
1. Set button position to -500 inside the function where the button is created.
2. Add "Wait 0":
+ System: On start of layout
-> Functions: Call tampiltombol2
-> System: Wait 0 seconds
-> tblnext: Set X to -500