✓ Accepted answer
Script and LocalScript are almost the same, but there are some difference between in those two. Things that are done in normal Script is server-sided, therefore replicate to all clients. LocalScripts will be processed only on the client, meaning that everything that is done in a LocalScript will only be visible for the client that processed it and it will not replicate to other clients (although it will still replicate to other clients if FilteringEnabled is turned off) and will not be able to interact other stuffs made other clients (they can still interact with the server). LocalScripts also cannot use server-sided services, functions, etc.
Therefore, your scripts doesn't work for a number of reasons:
#LocalScript#
Using the PlayerAdded event in a LocalScript cannot generally be used, because:
-It would be only fired for players that joins the server later, not firing for the current player
-As mentioned earlier, a LocalScript cannot interact other stuff created by other clients, so even when the event is fired for the next player that joins in, the gui wouldn't appear for that player. It simply cannot access the gui.
#Script#
Using the PlayerAdded event in a Script is generally fine, BUT, a server can't access a client's guis, therefore it's not possible to use a server/normal script
So only using a LocalScript we would be able to control our gui.
The fix is fairly simple. You do not need to use the PlayerAdded event, rather directly enabling the gui right at the start:
local frame = script.Parent
wait(100)
frame.Visible = true
So that's all. If this worked for you, please click the Answer button below and upvote the answer.
lead6dead2.