How to make a construction system like free fire

Hello, now I have been making a construction system a bit similar to that of free fire, which is that if the player activates the tool then a wall is placed depending on where the camera is (the game is combat therefore it does not work to have a mouse and what I want is for it to adapt to the camera) if you know another way to do it, thank you very much
example: FreeFire Roblox Highlights - YouTube

Can you please show a video of the system you want to make?

Oh alright, so you want a wall to appear infront of the player. I am going to sleep and i will help tommorow. Goodbye!

but follow the direction of follow the direction of the camera thank you please

Use the CFrame of the humanoidrootpart and position the wall a few studs forward from it.

local HumRp = --humanoid root part
local Wall = --wall
Wall.CFrame = HumRp.CFrame * CFrame.new(0, 0, -5) --5 studs forward from the humanoid root part

And make sure to put this in a renderstepped loop so it updates constantly