Make a infinite loop of enemies?f

Hello, I am trying to remake a game I made a couple years ago called Space Chickens. Here is the game:

If you play the game, you will probably notice the chickens loop to the other side of the screen when they hit the edge of the screen. I want to pretty much make this. How could I make them spawn at a random edge, go to the next edge, and spawn at a new random one?

This is my current game: Space Chickens! - Roblox

You can probably see there are panels in the circle you spawn in. Those are the spawn points for the chickens.

Any help is greatly appreciated, thank you!

Using AbsolutePosition and AbsoluteSize can allow you to produce your desired results. Those two alone can help you find the pixel positioning of each corner on the screen.

Frame is the background in this example:

local leftTopEdge = Frame.AbsolutePosition
local leftBottomEdge = Frame.AbsolutePosition +, Frame.AbsoluteSize.Y)
local rightTopEdge = Frame.AbsolutePosition +, 0)
local rightBottomEdge = Frame.AbsolutePosition + Frame.AbsoluteSize

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