I'm trying to make a set of GUIs move down when there is a new GUI being placed into the frame. Line 8, is where it fails and it's giving me a nil value for the position. I don't know how to fix this...
local new = main.VideoList.List:FindFirstChild("Copy"):Clone() local move = main.VideoList.List.MoveDown --Value of 56 local vidslist = main.VideoList.List local copyGui = main.VideoList.List.Copy local guiChildren = vidslist:GetChildren("Video") if guiChildren then guiChildren.Position = UDim2.new(0,0,0,guiChildren.Position.Y.Offset + move.Value) end new.Parent = main.VideoList.List new.Position = UDim2.new(0,0,0,0)
When it comes to moving and resizing guis I'd recommend using tweening. The official ROBLOX Wiki covers it all. But here's your answer anyway:
if guiChildren then guiChildren.Position = guiChildren.Position.Y.Offset + UDim2.new(0, 0, 0, move.Value) end