I have used scripts for buttons before a long time ago but thinking about using Scripts instead of LocalScripts for GUI buttons now doesn’t seem like a good practice.
In order to reach the Player and the Player.Character you will have to create a variable that uses multiple ".Parent"s in a variable. It’s something like “local plr = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent” etc and etc. Coding something like this seems pretty messy. I’d suggest using LocalScript.
I would suggest just using a local script makes it more organized and you can keep the same functions, if anything just send a remote to the server to change the characters position if you run into issues, seems kinda pointless. but local scripts you can reference the player easier so
Yes it will work, but i suggest using a remote event, as @happya_x said, GUIs communicating should be local scripts. Then communicate to the server with a remote event. It’s just good practice and there is probably something with performance too, i don’t know i never looked into why we use local scripts for client gui’s.