How do I make a gui following another gui behind it

Im trying to recreate google snake game with guis but I cant find anything to make this, this is how I want the gui to connect to other guis and so on


I want the position of the gui behind the front gui to update everytime it move, also I want it to move like the one in google where it follows the tiles the head just got into

you could set the ui to the first frames position minus its x scale / 2 and rotate the first frame whenever it goes up and such as it stays there.
E.g.

local firstFrame = --first frame
local currentFrame = --frame chasing main frame

local frameP = firstFrame.Position
local frameS = firstFrame.Size
local Sub = Udmi2.new(frameS.X.Scale/2,0,0,0)

while task.wait() do
    currentFrame.Position = frameP - Sub
end
2 Likes

The gui should have the same X and Y scale sizes, or it would be a bit complicated.
Set the anchor point to .5 , .5 when the main part moves, move the other parts by the size of their x / y values multiplied by there position in the snake body

Another thing is creating a grid and other than moving the snake you change the colors of the tiles so when moving downwards, you change the color of the tile In front of him and the last tile of his body (this is how the game was actually done in the first place, idk if roblox can handle it tho.)