How do i make the placement more correct and accurate?
Heres my script so far:
Run.Stepped:Connect(function(plays)
if builded ~= nil then
if builded.Type.Value == "Wall" then
local mag = math.huge
local grid
for i, v in pairs(game.Workspace.Grids:GetChildren()) do
local magger = (player.Character.HumanoidRootPart.Position - v.Position).magnitude
if magger < mag then
mag = magger
grid = v
end
end
builded.CFrame = grid.CFrame * CFrame.new(0, 0, -10)
builded.CFrame = builded.CFrame + Vector3.new(0, 2.84, 0)
end
end
end)
Heres a video of the result
https://gyazo.com/fbb783805eb280d6dffedae7f202fa3d
So how do i fix it?
thanks

1 comment
Hmm... I am not to shure...