How to make a place down barrier

Hello recently I made a game and a staff barrier. But I want to know how you script it so you can place 20 barriers down.

  • Max 20 Barriers
  • Able to place down multiple barriers
  • Able to, Delete all barriers, Place Down Barrier.

If you could help this would be great!


Place Barrier:

1 Like

Well, we aren’t exactly going to spoonfeed code, but you can do it something like this:

local max = 20
local barriers = 0

This essentially sets up the initial varaibles.

local max = 20
local barriers = 0

   if barriers < max then
      barriers = barriers + 1
      -- Do code to clone it and position it.

When I put the tool for the team it doesn’t pop up!

Can we see your current script?

You don’t put the tools in the team. You need to script it so it gives it to the people on certain teams. You can do this with PlayerAdded and Player.Team.

1 Like