I want to make the size of the part randomly every time,why my script not work.-

bandicam 2020-09-07 12-18-27-165

2 Likes
while true do
	wait()
	local RandomSize = math.random(1, 100)
	script.Parent.Size = Vector3.new(RandomSize, RandomSize, RandomSize)
end

The random number was outside of the while loop so it only ran once and stayed the same number

6 Likes

Also, if you want the dimensions to be different you would do this:

while true do
    local Xscale = math.random(1,100)
    local Yscale = math.random(1,100)
    local Zscale = math.random(1,100)

    script.Parent.Size = Vector3.New(Xscale, Yscale, Zscale)
    wait()
end
4 Likes