Wednesday, June 5, 2013

Scripting Tutorial: Making A Chat Gui

When coding in ROBLOX Studio for things that will make your games look lots more stylish, you have your cookiez and milk next to you while coding a beautiful addition to your game. On this tutorial, I will create a chat gui, very simple, and can be modified however you wish. If you would like to edit this and do not know what to do, personal message me. (zakary99)

1. Write this in the command bar:"ScreenGui", game.StarterGui).Name = "ChatGui" or add a new ScreenGui to StarterGui and name it 'ChatGui'.

2. Add this code to a script in the workspace:
game.Players.PlayerAdded:connect(function(player) -- Main two functions.
for _,v in pairs (game.Players:GetChildren()) do -- Gets all the players
for _,frame in pairs(v.PlayerGui.ChatGui:GetChildren()) do --Finds the chat children if there is one.
if frame:IsA("Frame") then-- Finds out if the chat's children is a frame
frame.Position =, 0, frame.Position.Y.Scale-0.05, 0) -- moves the frame up.
frame ="Frame", v.PlayerGui.ChatGui)--Makes a new frame for the text.
frame.Size =, 0, 0.05, 0)--Chooses the main size.
frame.Position =, 0, 0.05, 0)--Gives the frame the correct position.
frame.Style = "RobloxRound" -- Makes the frame Roblox Round
frame.ClipDescendants = true -- Makes it so the text cannote escape the frame."TextLabel", frame) -- Makes the message label.
message.Position =, 0, 0.5, 0) -- Chooses the correct position inside the frame.
message.TextXAlignment = "Left" -- Makes the text on a left alignment so it has a better length.
message.TextColor3 ="White").Color --Chooses the color
message.Text = "["..player.Name.."]: "..msg -- Gets the message and player's name inside the message label.
message.FontSize = "Size18" -- gives the message's font size 18
message.Font = "Arial" -- A personal favourite

end) -- Ends the functions.

Click here to take the model.

This is just a simple chat gui, you could integrate things like TweenPosition() method and Coroutines.

Thanks for reading,
Any questions? Tweet me @RBX_Zakary99, skype me: Zakary Wilson (hetrozakary), PM me (zakary99)

~Zakary Wilson


  1. You made a mistake.
    It's ClipsDescendants, not ClipDescendant

  2. .-. There is no mistake- it worked for me.

  3. Your blog prevents copying text. This is a hindrance considering your posts contain code that people ought to be able to copy and paste into their scripts to try them out.

  4. If you write out the script it tends to make you learn better. But I do see your point Joel


Write your comment here... OR Flingi will eat you