local s = script.Parent
for _, i in pairs(s:GetDescendants())do
if i:IsA("BasePart")then
i.Touched:Connect(function(hit)
game.Workspace.spawns.SpawnLocation.Name = "L"
i.Name = "SpawnLocation"
end)
end
end
I basically have a group of all of the different levels and when you touch one inside the loop it changes the name so that when you step on it it changes the name so you will always spawn there until you touch another block.