How fix this Script?

I find this too,
How I can fix this script?
For this game-
:link: My game is not loading Data
:link: How I can fix this script?
:link: How fix this Script?

local clientChatModules = script.Parent.Parent
local ChatSettings = require(clientChatModules:WaitForChild(“ChatSettings”))
local ChatConstants = require(clientChatModules:WaitForChild(“ChatConstants”))
local util = require(script.Parent:WaitForChild(“Util”))
CreateWelcomeMessageLabel = function(messageData, channelName)
local message = messageData.Message
if not messageData.ExtraData then
local extraData = {}
if not extraData.Font then
local useFont = ChatSettings.DefaultFont
if not extraData.FontSize then
local useTextSize = ChatSettings.ChatWindowTextSize
if not extraData.ChatColor then
local useChatColor = ChatSettings.DefaultMessageColor
local useChannelColor = extraData.ChannelColor or useChatColor
local BaseFrame, BaseMessage = util:CreateBaseMessage(message, useFont, useTextSize, useChatColor)
local ChannelButton = nil
if channelName ~= messageData.OriginalChannel then
local formatChannelName = string.format("{%s}", messageData.OriginalChannel)
ChannelButton = util:AddChannelButtonToBaseMessage(BaseMessage, useChannelColor, formatChannelName, messageData.OriginalChannel)
local numNeededSpaces = util:GetNumberOfSpaces(formatChannelName, useFont, useTextSize) + 1
BaseMessage.Text = string.rep(" ", numNeededSpaces) … message
local GetHeightFunction = function(xSize)
return util:GetMessageHeight(BaseMessage, BaseFrame, xSize)

        		local FadeParmaters = {}
        		FadeParmaters[BaseMessage] = {
        TextTransparency = {FadedIn = 0, FadedOut = 1}
        TextStrokeTransparency = {FadedIn = 0.75, FadedOut = 1}
        		if ChannelButton then
        			FadeParmaters[ChannelButton] = {
        TextTransparency = {FadedIn = 0, FadedOut = 1}
        TextStrokeTransparency = {FadedIn = 0.75, FadedOut = 1}
        		local FadeInFunction, FadeOutFunction, UpdateAnimFunction = util:CreateFadeFunctions(FadeParmaters)
        		return {[util.KEY_BASE_FRAME] = BaseFrame, [util.KEY_BASE_MESSAGE] = BaseMessage, [util.KEY_UPDATE_TEXT_FUNC] = nil, [util.KEY_GET_HEIGHT] = GetHeightFunction, [util.KEY_FADE_IN] = FadeInFunction, [util.KEY_FADE_OUT] = FadeOutFunction, [util.KEY_UPDATE_ANIMATION] = UpdateAnimFunction}

        return {[util.KEY_MESSAGE_TYPE] = ChatConstants.MessageTypeWelcome, [util.KEY_CREATOR_FUNCTION] = CreateWelcomeMessageLabel}

Could you provide a little more information about your problem with this script?

Are you receiving errors, is their unexpected behaviour, etc?

Also, people will be much more interested in helping you if your post contains properly styled code, you can do this by surrounding your entire piece of code with these: ``` like below:

code here


print("Hello, world!")

I suggest giving this a read: Code Formatting Etiquette


The game has much Scripts to fix, I don’t know what to do.

Unfortunately, the purpose of #development-support:scripting-support is not to help you fix or create entire games.

We can help you with issues in your code, but you are expected to give us a general understanding of that code’s purpose.

I would recommend reading this thread here: About the Scripting Support category which explains more about this section, however in short you should have an understanding of your own goals, an understanding and ability to explain the issue with your code, and the ability to provide as much description as possible.

Remember that while we all want to help you out, we cannot do so unless you provide us the required information, we do not have access to your game to perform tests, all we have is what you provide us with.

If you are totally unsure of what you are doing, perhaps you should take a step back. Revisit the basics of Lua and the Roblox environment, and ensure you are totally familiar with as much as possible before diving straight into the deep end. If you already feel comfortable with the basics, then even something like redesigning the scripts in your game from scratch will help you out.

If you are able to give more detail, I’m sure we will all be rushing in to help you, but at the moment there is not much room for us to do so.

1 Like

Please create a new thread with what you read in the About the Scripting Support category thread in mind.