Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Still dont know why my custom chat wont put the message in the frame?

I made this: https://scriptinghelpers.org/questions/101600/i-cant-see-the-problem-position-is-not-a-valid-member-of-localscript but maybe it was too chaotic.

This is the function to trigger the Message Event in ReplicatedStorage:

ChatBar.FocusLost:Connect(function(EnterPressed)
	if EnterPressed then
		local Message = ChatBar.Text
		if Message:len() > 0 then
			game.ReplicatedStorage.Message:FireServer(Message)
		else
				if Message:lower() == Message:upper() and Message ~= "" then
					game.ReplicatedStorage.Message:FireServer(Message)

and here's the function that is supposed to make the GUI:

game.ReplicatedStorage.Message.OnClientEvent:Connect(function(Message)
	local i = Instance.new("TextLabel",Frame)
	i.Size = UDim2.new(1,0,0.1,0)
	i.TextScaled = false
	i.BackgroundTransparency = 1
	i.Font = Enum.Font.SciFi
	i.TextStrokeTransparency = 0
	i.TextColor3 = Color3.new(235,235,233)
	i.Name = "Chat"
	i.Text = Message
	i.TextXAlignment = Enum.TextXAlignment.Left
	i.TextYAlignment = Enum.TextYAlignment.Top
	local t = Frame:GetChildren()
	Frame:ClearAllChildren()
	if #t > 10 then
		table.remove(t,1)
	end
	for c,v in pairs(t) do
		local l = v:Clone()
		l.Position = UDim2.new(0,0, (c-1)*0.1,0)
		l.Parent = Frame
	end
end)

I think it's the MessageEvent not firing but I have no idea why, or maybe its the failure to create the message.

9 comments

0

I had the same problem a month ago.

0

kay

0

Does it have any errors?

0

Can you post the full script

0

Sure

0

also it does not have a error

0

No errors

0

on output

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.