Originally, I was told to change my code from creating the button to instead getting a clone from somewhere else (Replicated Storage, in my case) which was already scaled. I thought for sure this would work so I closed the topic.
Now that I am testing it, I get the same effect. (JSYK I am using a scaling plugin to scale it)
Here is the script to insert the already-scaled button:
game.ReplicatedStorage.OneVOne.Refresh.OnClientEvent:Connect(function()
script.Parent.Parent.Refreshing.Visible = true
wait(1)
script.Parent.Parent.Refreshing.Visible = false
for ii, vv in pairs(script.Parent:GetChildren()) do
if vv:IsA("TextButton") then
vv:Destroy()
end
end
for i, v in pairs(game.Players:GetChildren()) do
local buttonclone = game.ReplicatedStorage.Resources.InsertTo1v1:Clone()
buttonclone.Parent = script.Parent
buttonclone.Name = v.Name
buttonclone.BackgroundColor3 = Color3.new(1, 0.0784314, 0.247059)
buttonclone.TextColor3 = Color3.new(1, 1, 1)
buttonclone.Font = Enum.Font.ArialBold
buttonclone.TextTransparency = 0
buttonclone.TextColor3 = Color3.new(0, 0, 0)
buttonclone.Text = v.Name
buttonclone.TextScaled = true
buttonclone.OneVeOneClickScript.Enabled = true
print("Created your button")
end
end)
This isn’t a script problem just a sizing problem.
Best way to fix this is to use a plugin like AutoScale Lite to convert the offset into Scale and so that way it’ll scale properly.