I passed on a variable that contains a part's position 'pos' and the remote event cant seem to do this (pos = part.Postion on script firing variable)
part.Position = pos
This must be an error and here is the rest of code for review
local Remote = game.ReplicatedStorage.wall Remote.OnServerEvent:Connect(function(playerWhoFired, o ,pos, pos2, pos3) local part = Instance.new("Part") print("Fired") part.Anchored = true part.Size = Vector3.new(31.77, 16.8, 2) part.Position = pos part.Parent = game.Workspace part.Name = "Wall" part.BrickColor = BrickColor.new("Dark orange") part.Material = Enum.Material.WoodPlanks end)
roblox automatically tries to make no parts collide when the Position property is set, same with Size and Orientation. the simple fix is to operate on the CFrame instead of the Position or Orientation property after setting the size
local Remote = game.ReplicatedStorage.wall Remote.OnServerEvent:Connect(function(playerWhoFired, o ,pos, pos2, pos3) local part = Instance.new("Part") print("Fired") part.Anchored = true part.Size = Vector3.new(31.77, 16.8, 2) part.CFrame = CFrame.new(pos) -- changed line part.Parent = game.Workspace part.Name = "Wall" part.BrickColor = BrickColor.new("Dark orange") part.Material = Enum.Material.WoodPlanks end)