One problem is simply the fact that you are using a Localscript. Try using a regular Script.
The reason for this is that ServerStorage
and ServerScriptStorage
are only accessible by regular scripts, and ReplicatedStorage
and ReplicatedFirst
are only accessible by Localscripts.
The other problems are as follows:
You need to change 'playergui' on line 8 to 'PlayerGui'
Change the period on line 1 to a colon. GetService
is a method, and you need to use it properly.
Change "conect" on line 3 to "connect". Simple spelling error.
Your final code should now look like this:
1 | serverStorage = game:GetService( "ServerStorage" ) |
3 | game.Players.PlayerAdded:connect( function (player) |
5 | local guiloader = serverStorage.gui:Clone() |
7 | player:WaitForChild( "PlayerGui" ) |
8 | guiloader.Parent = player.PlayerGui |
Anyways, I hope this helped. If not, or if you have any further problems/questions, please leave a comment below, and I'll see what I can do. Hope I helped!