How would I do this?

so I have this script:

local Animation = game.Workspace.Animation
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local Part = game.Workspace:WaitForChild("Parts")
game.Workspace.Part.Touched:Connect(function(touched)
	if touched.Parent:FindFirstChild("Humanoid") then
		local AnimPlay = touched.Parent.Humanoid:LoadAnimation(Animation)
		touched.Parent.HumanoidRootPart.Anchored = true
		AnimPlay:Play()
		AnimPlay.Stopped:wait() --Waits until it finished playing
		touched.Parent.HumanoidRootPart.Anchored = false
		player.TeamColor = BrickColor.new("Really red")
		if player.TeamColor == BrickColor.new("Really red") then
			script.Disabled = true
			if player.TeamColor == BrickColor.new("White") then
				script.Disabled = false
			end		
		end	
	end
end)

At this line here i think)

game.Workspace.Part.Touched:Connect(function(touched)

Instead of part how could I do all the parts inside a folder?

You can use a for loop to loop through all objects.

local Folder = workspace.Folder -- Change to your folder 

for Index, Part in pairs(Folder:GetChildren()) do
    Part.Touched:Connect(function(touched)
           if touched.Parent:FindFirstChild("Humanoid") then
	local AnimPlay = touched.Parent.Humanoid:LoadAnimation(Animation)
	touched.Parent.HumanoidRootPart.Anchored = true
	AnimPlay:Play()
	AnimPlay.Stopped:wait() --Waits until it finished playing
	touched.Parent.HumanoidRootPart.Anchored = false
	player.TeamColor = BrickColor.new("Really red")
	if player.TeamColor == BrickColor.new("Really red") then
		script.Disabled = true
		if player.TeamColor == BrickColor.new("White") then
			script.Disabled = false
		end		
	end	
    end)
end

Hope this helps you!