So, for fun I’m making slither on roblox.
A problem I’ve encountered is the insane amount of segments required to even get the snake off screen.
This is due to my current code for “spacing” the segments apart.
local PartAheadCFrame = workspace.Snakes[PlayerToUpdate.Name].Snake.Base.CFrame
for Index, Model in pairs(workspace.Snakes[PlayerToUpdate.Name].Following:GetChildren()) do
local MoveTo = PartAheadCFrame
PartAheadCFrame = Model.Base.CFrame
Model:PivotTo(MoveTo)
end
Well, there isn’t any spacing in my code.
The problem is that if I attempt to add spacing, the snake doesn’t rotate properly.
This is how the snake should function:
And this is how it shouldn’t function, which is where im stuck.
I want the parts to be spaced like in the second video, but move like in the first.
I may be stupid, but how do I do this?