Android mobile chat breaks when resizing is enabled

This is still happening and affecting my game.

After some investigation, I found out that the reason why this happens is because the loading screen initially is in Portrait Mode even though the game is only playable in Landscape Mode, and so the chat follows the default size when it’s in Portrait Mode. WindowResizable works fine if the player teleports to another place in the game since the loading screen does not become portrait mode.

3 Likes

I can also confirm that the problem seems to only occur when the phone is initially at portrait mode when starting up the game. If you start the game in landscape mode, it works just fine. Seeing as this issue hasn’t been resolved yet, I guess I’ll also set WindowResizable to False as well.

For those of you experiencing the same issue, ChatSettings is located right here. Change module.WindowResizable to False within the script in order to fix it.
chatsettings1

3 Likes

Also happening to me on my Galaxy S10e

2 Likes

Happens on my Samsung Galaxy Tab A Tablet

2 Likes

Yeah, as Aeralie said the issue hapens when the device is initially starts in portrait mode. There are two ways to fix that problem are to rejoin while holding your device on landscape mode, or if the Portrait mode is enabled in your game, go to Portrait mode and scale the chat window to the normal size. There, the problem with broken chat window is solved.

Therefore, there is no point in listing the devices that have that issue on this topic. :+1: Hope I helped. :slight_smile:

2 Likes

I have tried this, did not test it but it might solve it, probably disables resizable chat for phone and other devices with a touch screen (like some laptops). I am not checking for keyboard because some phones do have keyboard enabled even whilst not being connected to one.

1 Like

The bug is still happening and It’s annoying, I have a phone called Oppo A9 2020, Hopefully, this bug gets fixed because It’s taking too long to get fixed. (Note: this Is my first comment and I’m new to the Devforum.)

4 Likes

Just for proof that this still happens:

I initially started with portrait mode and Roblox sets it to landascape after the joining server message starts appearing. This is unconvenient to fix if you know how to (going to portrait mode and resizing it back) but it can be frustating for players who do not know how to fix this. This issue has been ongoing for a year.

Device: Samsung S20 FE (SM-G780G)

2 Likes

My device seems to be unaffected (Samsung Galaxy A51)

2 Likes

That’s… weird… (tried repro at an actual Samsung Galaxy A51 SM-A515F aswell, keep in mind phone is rooted, stock Android 11 One UI 3.1, security patch July 31 2021, MagiskSU v23, SafetyNet attestation fail as I have to update the Android anyways, custom recovery is OrangeFox, using a custom kernel called BlueFly which you can find at XDA)



1 Like

Oh, so this is why chat in my game is broken on random users’ devices. :slight_smile:

Not great that a built in option is broken in such an obscure way. This has been going on for months and I had no way to trace it.

3 Likes

Can confirm this happens on a Huawei Honor 9 Lite as well.

OS: Android 9 (running EMUI 9.1)
3GB RAM, 32GB storage

1 Like

It would be nice if somebody found a solution to this but this will be taking forever to fix and since it’s a roblox bug, that would be impossible to fix, hopefully, the people behind Roblox fixed this problem.

1 Like

Seems like this code fixed the problem! I’ll find a way to fix this

This isn’t the best solution, since you are modifying the chatscripts and you might not get any updates to the chat.

It would be better if Roblox pushed the solution themselves rather than having to do workarounds.

3 Likes

I know it would be better if Roblox did the job for us and I know that it might not bring me any new updates since I modified the chatscripts but since Roblox is taking forever to fix this problem, I decided to do it myself

Also, How can we enable Chat Resize without modifying the chatscripts? As you said, Modiying the chatscripts = might not get any updates to the chat

I’m not mad but I’m just trying to help you guys so that’s why I decided to give you guys my alternative way to fix this mobile bug, Thanks for the feedback tho.

Sigh, I guess you’re right… I’m very sorry, This Mobile Bug is still there for 2 Years or More so that’s why I decided to try to find ways to fix this problem by myself, there are some games that already fixed this problem but they didn’t give us the solution to fix this so, I did

1 Like

I have finally found the reason why the bug is being caused by this and it is because of Display Size on Android Phones, here’s a screenshot to explain everything. (and hopefully, the texts and the pictures aren’t too small, Sorry if they turn out to be too small)


For those who are interested, here are my current phone specs

Workarounds
@XxLegitOPxX's Workaround (Highly Recommended)
@Im_Andr3i's Workaround (No longer recommended anymore)

Just add task.wait() or wait() on top of your ChatSettings Script for a couple of seconds and that’s it

task.wait(5) -- or wait(), it's up to you on how long it will wait

-- Then put the rest of the chat settings script and that's it.

Keep in mind that sometimes this workaround does not work (depending on your device) so I recommend you using @XxLegitOPxX’s Workaround instead.

Or try using
@CodeProto’s workaround

To anyone who was wondering what happened to my other post, it was deleted by auto-mod because I mentioned everyone on that post (which means I broke a rule). I really apologize to those who were angry or annoyed about it. (Also that post has the same workaround in the Workarounds section so yeah)

1 Like

In this case it doesn’t matter. Like, at all.

Also I have a feeling that the timing of scripts is different when you use any scale other than normal (perhaps the engine has more things to process?), so that’s why it doesn’t break.


By the way, not sure if it’s related to this issue, but default chat size on my device (Pixel 4a) is way too big compared to OP’s iPhone, and I can see that @Im_Andr3i is experiencing it as well.

And yes, it is an issue, especially when using Dynamic Thumbstick.

1 Like

I think I may have found another workaround solution, but it doesn’t involve yielding like @Im_Andr3i 's solution does. Even with task.wait(5) at the start of ChatSettings was only preventing the bug from happening like half the time in one of my games.

Basically, this script resizes the mobile chat on the Y axis if it ever goes out of screen bounds. Make sure to put this into StarterPlayerScripts:

-- Services
local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Chat = game:GetService("Chat")
-- GUI stuff
local player = game.Players.LocalPlayer
local chatGui = player:WaitForChild("PlayerGui"):WaitForChild("Chat")
local chatFrame = chatGui:WaitForChild("Frame")
local chatSettings = require(Chat:WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"))

RunService:BindToRenderStep("KeepChatWithinScreenBounds",Enum.RenderPriority.Last.Value,function()
	if UIS.TouchEnabled and not UIS.KeyboardEnabled then -- Mobile/Tablet
		-- Check if chat size on Y axis is GREATER than screen size on Y axis
		
		if chatFrame.Size.Y.Offset > chatGui.AbsoluteSize.Y then -- Mobile chat uses offset for some reason, rather than Scale like PC does
			chatFrame.Size = chatSettings.DefaultWindowSizePhone -- For me this is set to UDim2.new(0.5, 0, 0.5, extraOffset)
		end
	end
end)
1 Like