I'm just trying to create a part from a different part. I'm not sure what the problem is. Here is my script
1 | --A Script in ServerScriptService |
2 | local WallThickness = 4 |
3 | local WallHeight = 50 |
4 | local Part = game.Workspace.Part |
5 | local CreatedPart = game.Workspace.Part:Clone() |
6 |
7 | CreatedPart.Size = Vector 3. new(WallThickness, WallHeight, Part.Size.Z) |
8 | --Error on the line below this one |
9 | CreatedPart.CFrame = CFrame.new(Part.Position.X - ((Part.Size/ 2 ) + WallThickness), (CreatedPart.Size/ 2 + Part.Position.Y), Part.Position.Z) |
your value named WallThickness
is a single number. You're adding it to Size
on the line with an error. Size
is a Vector3
value, and WallThickess
is a single number value. Therefore, they cannot be added together. Maybe use (Part.Size.X/2) + WallThickness
instead?