✓ Accepted answer
There are multiple errors here. I'll highlight them. Correct code is posted at the bottom:
###Incorrect syntax
On line 3 of your code, the synax is incorrect. Position requires a Vector3 value. Additonally, you accidently typed ".Position =" again, which will cause it to error.
On line 5 of your code, you set the size of Wall. Size also requires a Vector3 value in order to be correctly set.
On line 6 of your code: The Color property only takes a Color3 value, instead you can set the color by using BrickColor. An example of doing this would be:
Wall.BrickColor = BrickColor.new("Really Red")
On line 8, there is a less then symbol after true.
###Instance.new
The 2nd arguement of Instance.new is deprecated and should not be used. You should instead set the parent of Wall by doing Wall.Parent = game.Workspace.
###Indentation
Your code is improperly indented, you should be using a tab for every function you create. For example, typing if condition then will have you indent once. You continue this until the function ends.
###local variables
You should always turn your variables into local by adding a local infront of them. This is good practice since global variables clutter the enviroment!
Here is your updated code:
local Wall = Instance.new("Part")
Wall.Parent = game.Workspace
Wall.Anchored = true
Wall.Position = Vector3.new(Torso.Position + Torso.CFrame.lookVector * 5)
Wall.Name = "BigWall"
Wall.Size = Vector3.new(50, 50, 10)
Wall.BrickColor = BrickColor.new("Really Red")
Wall.Transparency = 0.3
Wall.CanCollide = true
6 comments
One correction. Bricks do now have the Color property.
Yes they do
Edited, thanks
It spawns INSIDE the character, not in front of it.
That's your fault. This is the exact code YOU wrote.
ok