Hey Devs, my question is: Did someone knows ho i can scale by 1:1 an Gui elements included like the Real TextChatService from device such as Mobile, Tablets, PC, Console and to seperate the size so means to have not the same size for Tablets when players play on Mobile the same even on the oposite side
I have tried to find a solution but i didnt find one that match my Question above
Destination:
to make the same chat with 1:1 size as its the normal TextChatService for each device with properties change by size if Mobile or Tablet
GuiObject.Size = Udim2.fromScale(1, 1)
--makes it so the UI is always the same size as the screengui
--if you want it to be the same size as roblox's UI, get its size and convert it to scale
Convert your current size to scaled by dividing the offset with your viewport size, or by setting it to a scale value in roblox studio property window, a random value like 0.1 and then scaling it back to its original size.
Hello @4_0gt thank u for you Tip but i use this pluging alr since 3 years or so IDK, but i have enabled the AutomaticSize to Y meaning this will not help me i thing and i try to make my own ChatSystem so i need to scale it 1:1 but anyways thank you
Hello @scavengingbot thnks for your helping but i didnt know what you means to scale it i didnt use that methode can you please explain it a bit or give me an example on how it works or what i need to script that
i am also have the Gui with AutomaticSize on the Y so i dont know how this will works
oh ok, if scale doesn’t work, you could manually set the size of your window by adding an event listener to the screengui and checking when its absolutesize changes, then you use your desired percentage:
local screenGUI = --your ui
local frame = n--your frame
local percentageX, percentageY = 0.2, 0.2--your percentages
screenGUI:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
frame.Size = UDim2.fromOffset(screenGUI.AbsoluteSize.X * percentageX, screenGUI.AbsoluteSize.Y * percentageY)
end)
this just mimics what scale does, but it still uses offset.