Hey forum (once again…) I am currently working on a function that sizes all text correctly without needing TextScaled, here is code:
function ReSize(UITable,Player)
local remoteEvent = game:GetService("ReplicatedStorage"):WaitForChild("")
local OriginalTextSizes = {}
for _,ui in pairs(UITable) do
table.insert(OriginalTextSizes,ui)
end
remoteEvent:FireClient(Player)
remoteEvent.OnServerEvent:Connect(function(FiredPlayer,ScreenResolution)
if FiredPlayer == Player then
for _,ui in pairs (UITable) do
local OriginalInstance = table.find(OriginalTextSizes,ui)
local OriginalTextSize = OriginalTextSizes[OriginalInstance].TextSize
print(OriginalTextSize)
if ScreenResolution.X >= 1500 and ScreenResolution.X <= 1999 then
ui.TextSize = OriginalTextSize + 5
elseif ScreenResolution.X >= 1000 and ScreenResolution.X <= 1499 then
ui.TextSize = OriginalTextSize
elseif ScreenResolution.X >= 500 and ScreenResolution.X <= 999 then
ui.TextSize = OriginalTextSize - 5
elseif ScreenResolution.X >= 0 and ScreenResolution.X <= 499 then
ui.TextSize = OriginalTextSize - 10
end
end
end
end)
end
The problem is when the TextSize changes OriginalTextSize Changes too, I thought maybe it’s because of:
ui.TextSize = OriginalTextSize - 10 --or -5,+5 etc
but I think it shouldn’t change along with it
--I proved that it changes with this line
print(OriginalTextSize)
Is there anything I can do?