how to make if player added function in startergui ?
hi can you help me add a 'if player added' function to this script?
I know it should be something like this but idk how it should be in startergui please help me
game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Char)
02 | local Torso = player.Character.Torso |
03 | local BackGui = Instance.new( "SurfaceGui" ,Torso) |
05 | BackGui.CanvasSize = Vector 2. new( 100 , 100 ) |
06 | local NameDisplay = Instance.new( "TextLabel" ,BackGui) |
07 | NameDisplay.Size = UDim 2. new( 0.6 , 0 , 0.6 , 0 ) |
08 | NameDisplay.Position = UDim 2. new( 0.21 , 0 , 0.28 , 0 ) |
09 | NameDisplay.BackgroundTransparency = 1 |
10 | NameDisplay.FontSize = 5 |
11 | NameDisplay.TextStrokeTransparency = 0 |
12 | NameDisplay.Text = player.hiddenstats.Jersey.Value |
13 | NameDisplay.TextColor 3 = Color 3. new( 1 , 1 , 1 ) |
14 | NameDisplay.TextScaled = true |
15 | NameDisplay.TextWrapped = true |
17 | player.hiddenstats.Jersey.Changed:connect( function () |
18 | NameDisplay.Text = player.hiddenstats.Jersey.Value |