Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Creating 2 Guis, That position is based on the first ones character length.?

Asked by 10 years ago

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

01function onkey2(enter)
02    msg = textbox.Text
03    if enter == true and script.Parent.Text:sub(1,1) ~= "/"
04        then
05        print(msg)
06        game.Workspace.Exodus.RemoteFunction:InvokeServer(msg)
07        sc.Chat.Sentence.Value = msg
08        script.Parent.Text = script.Value.Value
09    end
10    --Kicking Script--
11    if msg:sub(1,5) == "/kick" and enter == true
12        then
13        print("Kick Command")
14        script.Parent.Text = script.Value.Value
15        if rank >=2
View all 37 lines...

and here is server

01function script.RemoteFunction.OnServerInvoke(player, msg)
02    print(player,msg)
03            for i,v in pairs(script.Chat.Chat:GetChildren()) do
04        if v.ClassName == "TextLabel"
05            then
06            pos = v.Position
07        newpos = pos-UDim2.new(0, 0, .1666, 0)
08        v.Position = newpos
09        end
10    end
11    for i, v in pairs(game.Players:GetChildren()) do
12        if v.PlayerGui:FindFirstChild("Chat") ~= nil
13            then
14            chat = v.PlayerGui:FindFirstChild("Chat")
15            for i, v in pairs(chat.Chat:GetChildren()) do
View all 40 lines...

Above, Actually just noticed the scripts above dont have anything to do with the guis UDim2

Answer this question