I Have A Train System That Only Works One Way, One Time (Or Sometimes Doesnt Work At All) And I Really Dont Understand Why At All, It Is Run By Two Scripts, But They Are Identical, The Code Is Below:
script.Parent.Triggered:Connect(function(Player)
local char = Player.Character
local root = char:WaitForChild("HumanoidRootPart")
local tpart = script.Parent.TPart
local gui = script.TransitionScript:Clone()
gui.Parent = Player.PlayerGui
Player.Character.Humanoid.WalkSpeed = 0
local guii = Player.PlayerGui
Player.Character.Humanoid:UnequipTools()
for i, v in ipairs(Player.Backpack:GetChildren()) do
v.Parent = game.ReplicatedStorage:FindFirstChild(Player.Name)
end
task.wait(1)
root.CFrame = tpart.CFrame
task.wait(1)
for i, v in ipairs(game.ReplicatedStorage:FindFirstChild(Player.Name):GetChildren()) do
v.Parent = Player.Backpack
end
Player.Character.Humanoid.WalkSpeed = 20
end)