How can I scale the UI through my script?

So i’ve been trying to scale this UI in my script and it’s not working. Heres script and output error

local text = script.Parent
local maxlogs = text.MaxLogs
local logs = text.Logs
local slider = script.Parent.Parent.Slider

local function ChangeText()
	text.Text = (tostring(logs.Value).."/"..tostring(maxlogs.Value))
		slider.Size = UDim2(logs.Value / 100, 0, 1, 0)
end

logs.Changed:Connect(function()
	ChangeText()
end)

You need to use UDim2.new not UDim2

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.