Title explains it all.
script opens gui from proximity prompt.
script closes gui.

This is because :
Your server script works totally fine, and it’ll open the UI [and both server and client will see it].
However:
Your local script will make it so only the player will not see the UI, although for the server ,it’s still enabled. Try to switch the local script into a normal script, or use a remote.