OverHeadGui Group rank checker and rank name?
Ok so I made an Overhead gui script and I want it to check if a person is in a group and if he is not kick him and if he is check his rank and make it the text.
01 | game.Players.PlayerAdded:connect(onPlayerRespawned) |
02 | function onPlayerRespawned(newPlayer) |
04 | if newPlayer.Name = = "YourNameHere" then |
05 | gui = Instance.new( "BillboardGui" ) |
06 | gui.Parent = newPlayer.Character.Head |
07 | gui.Adornee = newPlayer.Character.Head |
09 | gui.Size = UDim 2. new( 3 , 0 , 3 , 0 ) |
10 | gui.StudsOffset = Vector 3. new( 0.5 , 2 , 0 ) |
11 | text = Instance.new( "TextLabel" ) |
12 | text.Text = ( "GAME CREATOR" ) |
14 | text.TextColor 3 = Color 3. new( 234 , 252 , 0 ) |
15 | text.Size = UDim 2. new( 1 , 0 , 1 , 0 ) |
16 | text.FontSize = 'Size32' |
17 | text.Position = UDim 2. new(- 0.125 , 0 ,- 0.25 , 0 ) |
18 | text.BackgroundTransparency = 1 |
23 | function onPlayerEntered(newPlayer) |
24 | newPlayer.Changed:connect( function (property) |
25 | if (property = = "Character" ) then |
26 | onPlayerRespawned(newPlayer) |
31 | game.Players.PlayerAdded:connect(onPlayerEntered) |
That's the script I would appriciate if u help, thanks for reading.