Radio messages going off the screen

Context: I am using a UIListLayout.

So I’m working on a radio, and everything is done, (All events work, all that jazz) it’s just that I don’t really know what to do about the messages staying within the frame.

There are 2 issues that need to be fixed.

  1. The radio messages going off the screen.
    Example of what I want: image
    Example of what’s happening: image
  2. I want the message to start from the top, and push the other messages down, which at the moment, isn’t possible with a UIListLayot, (Don’t know of alternatives.)

Okay, moving on: I attempted to use AbsolutePosition to remove the messages with my Local Script:

local MessageEvent = game.ReplicatedStorage.SendMessageToAll
local MessageFrame = script.Parent.MessageFrame
local Format = MessageFrame.Format

MessageEvent.OnClientEvent:Connect(function(plr, msg, color)
	local NewMessage = Format:Clone()
	NewMessage.Parent = MessageFrame
	NewMessage.TextColor3 = color
	NewMessage.Text = plr.Name .. " - " .. msg
	NewMessage.Visible = true
	
	for i,v in pairs(MessageFrame:GetChildren()) do
		if v:IsA("TextLabel") then
			if v.AbsolutePosition.Y >= 360 then
				v:Destroy()
			end
		end
	end
end)

And this method doesn’t work at the moment because AbsolutePosition changes with screen resolution, essentially nullifying this method.

So if you have any way to help me, that’d be greatly appreciated.

1 Like

Hack your way past it with a workaround of using a ScrollingFrame, this will allow the messages to sink in without an issue.

Although the messy workaround, you should probably use:

1 Like

ClipsDescendants works beautifully, but I don’t really know what to do for the ScrollingFrame, it doesn’t seem to work for me. I’m gonna make a layout order system. Essentially capping out at 1 billion messages.

1 Like