As a newer coder needing to make a model copy itself alot I am trying to find more understandable info on this.
Here is the code I currently have, it runs fine with no errors, but doesn’t work as the dev hub described. I’m not gonna label this as a bug because I think i’m just doing it wrong.
for count = 0, 269999999973, 27 do
local track = game.ServerStorage.TrackPiece:Clone()
track.Parent = game.Workspace.Tracks
track.PrimaryPart = game.ServerStorage.TrackPiece.TieMain
track:SetPrimaryPartCFrame(CFrame.new(count, 0.6, 22.5))
wait(0.1)
print(count)
end
It only pastes the Primary part over and over again and doesnt paste the whole group like drescibed here: " All other parts in the model will also be moved and will maintain their orientation and offset respective to the Model.PrimaryPart ."
Try this code instead, and make sure all the parts are Anchored if they’re set to CanCollide = false
for count = 0, 269999999973, 27 do
local track = game.ServerStorage.TrackPiece:Clone()
track.Parent = game.Workspace.Tracks
track.PrimaryPart = track.TieMain --Changed this, even though if you had the part set as the PrimaryPart before cloning, you shouldn't need to re-set the PrimaryPart.
track:SetPrimaryPartCFrame(CFrame.new(count, 0.6, 22.5))
wait(0.1)
print(count)
end
Did you try @MrLonely1221 's solution?
I was able to both recreate and fix your problem in my studio using his solution, even when the track was entirely unanchored
If this still doesnt work it might just be better for everyone to, again, just send the place file