this is my script so far:
Player = script.Parent.Parent
mouse = Player:GetMouse()
function onKeyDown(key)
Key = key:lower()
if Key == "r" then
x = Instance.new("Part")
x.BrickColor = BrickColor.new("Reddish brown")
x.Size = Vector3.new(8,1,8)
x.Anchored = true
x.TopSurface = "Smooth"
x.BottomSurface = "Smooth"
x.Material = "Brick"
x.Parent = Workspace
x.CFrame = Player.Character.Torso.CFrame *CFrame.new(0,0,-5)
x.Rotation = Vector3.new(Player.Character.Torso.Rotation)
game.Debris:AddItem(x,3)
end
end
mouse.KeyDown:connect(onKeyDown)
Effectively i'm trying to make a wall that faces you.

1 comment
Update this question with the Code Block button and put your code inside of that.