I'm attempting to create a bar graph that creates resizes itself randomly every few seconds. However, I've had no luck getting math.random working with UDim2. Any clues on how?
PS. I have tried Random.new, however, I've had no luck with that as well.
Code:
local Bar = script.Parent.Bar
while true do wait(1)
Bar.Size = UDim2.new(Random.new(1,0):NextNumber(0,515))
end
--I have tried math.random, however I don't think I can do it with math.random.

5 comments
Please post your code,
My current code is this. local Bar = script.Parent.Bar while true do wait(1) Bar.Size = UDim2.new(Random.new(1,0):NextNumber(0,515)) end --I have tried math.random, however I don't think I can do it with math.random.
I see your problem, UDim2 requires 4 parameters, that being (X scale, X offset, Y scale, Y offset). You only have one. Also math.random should work, I don't see why not.
Thanks!
If your question was answered please edit your post and add "[SOLVED]" to the title.