Creating 2 Guis, That position is based on the first ones character length.?
I have created a chat gui, which is efficient besides the fact that unlike robloxs default. The textlabel itself is 1 so the color is 1. I want to make it so the name is the players team color and the text is right beside it is white. Im using remotefunction to translate it from local to serverside. But here is local
Local
03 | if enter = = true and script.Parent.Text:sub( 1 , 1 ) ~ = "/" |
06 | game.Workspace.Exodus.RemoteFunction:InvokeServer(msg) |
07 | sc.Chat.Sentence.Value = msg |
08 | script.Parent.Text = script.Value.Value |
11 | if msg:sub( 1 , 5 ) = = "/kick" and enter = = true |
14 | script.Parent.Text = script.Value.Value |
17 | check = msg:sub( 7 , msg:len()):lower() |
20 | for i, v in pairs (game.Players:GetChildren()) do |
21 | if v.Name:len() > = num |
23 | name = v.Name:sub( 1 ,num):lower() |
25 | if name = = check and v ~ = player |
28 | localmsg( "Succesfully Kicked: " ..v.Name) |
and here is server
01 | function script.RemoteFunction.OnServerInvoke(player, msg) |
03 | for i,v in pairs (script.Chat.Chat:GetChildren()) do |
04 | if v.ClassName = = "TextLabel" |
07 | newpos = pos-UDim 2. new( 0 , 0 , . 1666 , 0 ) |
11 | for i, v in pairs (game.Players:GetChildren()) do |
12 | if v.PlayerGui:FindFirstChild( "Chat" ) ~ = nil |
14 | chat = v.PlayerGui:FindFirstChild( "Chat" ) |
15 | for i, v in pairs (chat.Chat:GetChildren()) do |
16 | if v.ClassName = = "TextLabel" |
19 | newpos = pos-UDim 2. new( 0 , 0 , . 1666 , 0 ) |
25 | chat = game.Lighting.Chat:clone() |
26 | chat.Text = player.Name.. ": " ..msg |
27 | chat.Parent = script.Chat.Chat |
28 | for i, v in pairs (game.Players:GetChildren()) do |
29 | if v:FindFirstChild( "PlayerGui" ) ~ = nil |
31 | if v:FindFirstChild( "PlayerGui" ):FindFirstChild( "Chat" ) |
33 | bin = v:FindFirstChild( "PlayerGui" ):FindFirstChild( "Chat" ).Chat |
34 | chat = game.Lighting.Chat:clone() |
35 | chat.Text = player.Name.. ": " ..msg |
Above, Actually just noticed the scripts above dont have anything to do with the guis UDim2