I'm trying to automatically generate paths for my roads however on curves the parts created clip with the road.
local paths = Instance.new("Model",game.Workspace) paths.Name = "paths" for i,v in pairs (game.Workspace.roads:getChildren()) do local oldCFrame = v.CFrame local oldSize = v.Size local vClone = v:Clone() vClone.Size = Vector3.new(oldSize.x,oldSize.y,10) vClone.CFrame = oldCFrame + Vector3.new(31,0,0) vClone.Parent = paths end
Here's an image of the issue http://prntscr.com/fq4jgo
CFrame_1 * CFrame_2
CFrame_2 is offsetted in relative object space by CFrame_1.
CFrame_1 + Vector_1
CFrame_1 is translated in world space by Vector_1
Use the CFrame * CFrame constructor for relative positioning - matching oldCFrame's orientation.
vClone.CFrame = oldCFrame * CFrame.new(31,0,0)