Hello! So, i’m trying to make a Rail Grinding system similar to the ones from the Sonic The Hedgehog games. I’m trying to do this by having multiple parts (for example to make a curved rail), and attachments at each point of the rail. I can make it work with a straight rail, but when it comes to making a rail that is curved which requires multiple parts and attachments, i always find myself confused.
function RopeGrinding:Grind(Player: Player)
local Character = Player.Character or Player.CharacterAdded:Wait()
local Root = Character:WaitForChild("HumanoidRootPart")
local PosInfo = TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.In)
local CurrentPos
local Positions = {}
for Index, Value in pairs(self._Positions:GetChildren()) do
table.insert(Positions, Value)
end
Root.Anchored = true
CurrentPos = Positions[1]
Root.CFrame = self._Positions.Attachment0.WorldCFrame
end