Simple question. I am working with UI right now and I am wondering which one is more efficient/recommended to be used when calling the parent? Both do reference the same parent.
local Button = script.Parent.Parent:WaitForChild("ReCenterMap")
or
local Button = script.Parent
I am not exactly sure of what you are trying to accomplish here. The second line of code would be much more simple and just as efficient as the first line. The first line of code just overcomplicates things. If I am correct, there is no need to use WaitForChild() to wait for the parent of a script. I'm fairly certain that if the script has loaded in, the parent of the script has too.
That makes no sense. What are you trying to accomplish?