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

ChatMakeSystemMessage Chat part not working?

I'm making a custom chat system message thing, and the the [Playername]: Part of the script pops up, but the text that is supposed to pop up isn't, help? https://i.imgur.com/XpZreEB.png

4 comments

0

It doesn't look like you ever set a GUI to a value. You create what looks like a variable instead by doing Text ="...

0

What do you mean?

0

Text is not equal to anything inside of that picture, therefore, the game thinks text is a variable, not what you want the gui to be set as

0

How would I be able to fix the problem? I'm not all that good with rlua coding yet so eheh

1 answer

✓ Accepted answer

I'm not exactly sure what you were going for with this...

local chat = 'This is what will pop up'
local PlayerName = game.Players.LocalPlayer.Name

game.StarterGui:SetCore('ChatMakeSystemMessage', {
	Text = '[' .. PlayerName .. ']' .. chat
})

I'm not sure how you have your gui's set or anything, that's going to have to be on you... But what I have above does work while in a localscript somewhere within the player.

You're going to have to be a little more detailed if you need some more help. Have any questions? Feel free to comment.

EDITED:

local StarterGui = game:GetService('StarterGui')
local player = game.Players.LocalPlayer

local frame = script.Parent.Parent
local ChatSayer = script.Parent
local thingtoSay = frame.ChatText

ChatSayer.MouseButton1Click:Connect(function()
	StarterGui:SetCore('ChatMakeSystemMessage',
		{
			Text = '[' .. player.Name .. '] ' .. thingtoSay.Text
		}
	)
end)

What I have here is it is setting it every time that you hit that 'ChatSayer' button. if this isn't what you were wanting then just take out the 'MouseButton1Click function and just set the text to whatever you'd like it to be...

Remember this is going to be local.. if you want it to work on the server you MUST filter it before it is actually sent

But I hope this helps

4 comments

0

not sure what you mean with "How I have my gui set" but here is a screenshot of how it is, and if the gui itself also needs to be screenshotted then i'll include that also https://imgur.com/ND0PGVx

0

I updated it

0

turns out all I had to do was make make the local chat's thing be game.Players.LocalPlayer.PlayerGui instead of just game.StarterGui, and also had to move the local chat inside of the button function, thanks for the help though!

0

You're welcome, glad I could help at least a little!

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