I’m trying to spawn a wall in front of the player, 35 studs out, and perpendicular to their view (so the wall is flat in front of them). When I spawn the wall, it doesn’t show up in the correct spot and I’m not sure why. Please see this video for example.
local player = game.Players.LocalPlayer
local char = player.Character
local rootPart = char:WaitForChild("HumanoidRootPart")
local wall = workspace.FX:WaitForChild("Wall")
-- Note that the wall is cloned into the FX folder in a different script.
wall.Position = rootPart.CFrame.LookVector.Unit * 35 + rootPart.Position
New contributor
DaNewbyGamer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.